close-prs-for-unapproved-issues workflow does not close PRs linked to pre-existing issues
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 85/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- github-actions
- Domain
- ci-cd
Research direction
Start with .github/workflows/close-prs-for-unapproved-issues.yml, especially the condition at line 76, and review how the workflow identifies labels on linked issues. Verify the behavior for a PR linked to a pre-existing issue without approval labels and for one with the Approved Issue label. Done means unapproved linked PRs are closed while approved ones remain open.
Written by the indexing model from the issue text.
Description
Describe the bug.
The three issue-approval workflows (issue-awaiting-approval.yml, issue-approve-command.yml, close-prs-for-unapproved-issues.yml) were all introduced in PR #2192. The auto-labelling workflow (issue-awaiting-approval.yml) only fires on issues: opened, so any issue created before that date never received the Awaiting Approval label.
The PR-closing workflow checks whether the linked issue has the Awaiting Approval label (line 76):
For pre-existing issues that have neither Awaiting Approval nor Approved Issue, this condition is false, so the PR stays open - bypassing the intended gate.
Proposed fix
Rather than checking if Awaiting Approval is present, we will check if the issue has the Approved Issue label. If yes, it keeps the pr open other wise closes that pr
Expected behavior
New PR's, which are linked to old issues, are closed even if the awaiting approval label is not there!
Screenshots
This pr is not closed, even though attached issue is not approved !!
How to Reproduce
see the screenshot i have attached!
🖥️ Device Information [optional]
No response
👀 Have you checked for similar open issues?
- I checked and didn't find similar issue
🏢 Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue ?
Yes I am willing to submit a PR!
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 396
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 26
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from asyncapi/generator
-
📑 docs
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
stale
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
-
area/javascript enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 38/100
All issues in asyncapi/generator
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·