Skip to content

ci: close PRs linked to issues lacking 'Approved Issue' label - #2264

Open
Yashisinghal285 wants to merge 1 commit into
asyncapi:masterfrom
Yashisinghal285:fix/close-prs-for-unapproved-issues-2
Open

Yashisinghal285 wants to merge 1 commit into
asyncapi:masterfrom
Yashisinghal285:fix/close-prs-for-unapproved-issues-2

Conversation

@Yashisinghal285

@Yashisinghal285 Yashisinghal285 commented Oct 2, 2026 •

Copy link
Copy Markdown

Description

  • Updates .github/workflows/close-prs-for-unapproved-issues.yml to check for the presence of the Approved Issue label on linked issues rather than checking for Awaiting Approval.
  • Ensures pre-existing issues that never received the Awaiting Approval label cannot bypass the maintainer approval gate.
  • Updates log messages and workflow comments to reflect the requirement for the Approved Issue label.

Related issue(s)
Resolves #2252

AI assistance

  • This PR was created with AI assistance — Generated-by: Antigravity
  • No AI assistance was used

Summary by CodeRabbit

  • Workflow Changes
    • Pull requests are now closed when any linked issue does not have the exact Approved Issue label. All linked issues must carry that label for the pull request to remain open.

…pi#2252)

In close-prs-for-unapproved-issues.yml, check that the linked issue has the 'Approved Issue' label rather than checking for the presence of 'Awaiting Approval'. This ensures pre-existing issues that never received the 'Awaiting Approval' label cannot bypass the approval gate.

Resolves asyncapi#2252
@changeset-bot

changeset-bot Bot commented Oct 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 20f7abe

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@asyncapi-bot

Copy link
Copy Markdown
Contributor

What reviewer looks at during PR review

The following are ideal points maintainers look for during review. Reviewing these points yourself beforehand can help streamline the review process and reduce time to merge.

  1. PR Title: Use a concise title that follows our Conventional Commits guidelines and clearly summarizes the changes using the imperative mood (written as if giving a command or instruction such as "add new helper for listing operations")

    Note - In Generator, prepend feat: or fix: in PR title only when PATCH/MINOR release must be triggered.

  2. PR Description: Clearly explain the issue being solved, summarize the changes made, and mention the related issue.

    Note - In Generator, we use Maintainers Work board to track progress. Ensure the PR Description includes Resolves #<issue-number> or Fixes #<issue-number> this will automatically close the linked issue when the PR is merged and helps automate the maintainers workflow.

  3. Documentation: Update the relevant Generator documentation to accurately reflect the changes introduced in the PR, ensuring users and contributors have up-to-date guidance.

  4. Comments and JSDoc: Write clear and consistent JSDoc comments for functions, including parameter types, return values, and error conditions, so others can easily understand and use the code.

  5. DRY Code: Ensure the code follows the Don't Repeat Yourself principle. Look out for duplicate logic that can be reused.

  6. Test Coverage: Ensure the new code is well-tested with meaningful test cases that pass consistently and cover all relevant edge cases.

  7. Commit History: Contributors should avoid force-pushing as much as possible. It makes it harder to track incremental changes and review the latest updates.

  8. Template Design Principles Alignment: While reviewing template-related changes in the packages/ directory, ensure they align with the Assumptions and Principles. If any principle feels outdated or no longer applicable, start a discussion these principles are meant to evolve with the project.

  9. Reduce Scope When Needed: If an issue or PR feels too large or complex, consider splitting it and creating follow-up issues. Smaller, focused PRs are easier to review and merge.

  10. Bot Comments: As reviewers, check that contributors have appropriately addressed comments or suggestions made by automated bots. If there are bot comments the reviewer disagrees with, react to them or mark them as resolved, so the review history remains clear and accurate.

@coderabbitai

coderabbitai Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: asyncapi/generator/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 37a479ea-5840-4944-94a0-832e6ea32fbd

📥 Commits

Reviewing files that changed from the base of the PR and between 81a0632 and 20f7abe.

📒 Files selected for processing (1)
  • .github/workflows/close-prs-for-unapproved-issues.yml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The pull request changes the workflow to close a pull request when any linked issue lacks the Approved Issue label. It also updates the workflow comment and completion log to reflect this check.

Changes

Linked issue approval gate

Layer / File(s) Summary
Check linked issue approval
.github/workflows/close-prs-for-unapproved-issues.yml
The workflow checks linked issues for Approved Issue and closes the pull request when a linked issue lacks that label. The purpose comment and completion log now reflect the approval-label check.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~8 minutes

Severity of issue fixed: Low

Merge Risk: ⚪ Minimal · up to 20f7a

The approval gate now checks for Approved Issue, and pull requests without linked issues are asked to add one before reopening. No merge-blocking risk is established.

Architecture Summary

Architecture risk: 🔵 Low · up to 20f7a

The changed surface does not map to a changed system, dependency edge, entrypoint, or external dependency.

Changed systems: None identified.

Architecture concerns
No architecture-level concerns identified.

Review details

Before / after behavior

  • observed — Modified behavior in .github/workflows/close-prs-for-unapproved-issues.yml: The purpose comment now describes issues lacking the Approved Issue label instead of issues still carrying Awaiting Approval.
  • observed — Modified behavior in .github/workflows/close-prs-for-unapproved-issues.yml: The label checked for each linked issue changes from Awaiting Approval to Approved Issue; the workflow now proceeds to close the PR when that approval label is absent.
  • observed — Modified behavior in .github/workflows/close-prs-for-unapproved-issues.yml: The closure condition changes from finding Awaiting Approval to not finding Approved Issue; a linked issue with no matching label now closes the PR.
  • observed — Modified behavior in .github/workflows/close-prs-for-unapproved-issues.yml: The completion log now states that all linked issues are approved, removing the previous qualification that no matching label may have been found.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title uses the Conventional Commits ci: prefix, uses imperative mood with “close,” and clearly describes the workflow change.
Linked Issues check ✅ Passed Issue #2252 requires the workflow to retain a PR only when every linked issue has the exact Approved Issue label, and to close the PR otherwise. The PR changes `.github/workflows/close-prs-for-unapp…
Out of Scope Changes check ✅ Passed The reported change is limited to .github/workflows/close-prs-for-unapproved-issues.yml. The condition, comments, and log messages directly support issue #2252. No unrelated implementation or docume…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Autopilot is currently an internal CodeRabbit preview.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sonarqubecloud

sonarqubecloud Bot commented Oct 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

close-prs-for-unapproved-issues workflow does not close PRs linked to pre-existing issues

2 participants