refactor: share is-release-pr check between changelog updates and stale closer - #9685
Open
cryptodev-2s wants to merge 2 commits into
Open
refactor: share is-release-pr check between changelog updates and stale closer#9685cryptodev-2s wants to merge 2 commits into
cryptodev-2s wants to merge 2 commits into
Conversation
Extract the update-changelogs release check into a reusable action and use it to confirm candidates before auto-closing stale release PRs.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 3 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 869c4b3. Configure here.
Paginate candidate discovery, keep unique artifact filenames, continue closing after partial matrix failures, and pass PR numbers via env.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Explanation
Shares release PR detection between changelog updates and the stale release closer.
.github/actions/is-release-pr(merge-base +MetaMask/action-is-release)update-changelogsandclose-stale-release-prsboth use itrelease/*, then only closes PRs confirmed as releases (root version bump +RELEASE_COMMIT_PREFIX)Stacked on #9655 for review with @mcmire.
References
Checklist
Note
Medium Risk
Changes release automation and which PRs can be auto-closed; mis-detection could close the wrong PR or miss stale ones, but logic is aligned with existing changelog release checks.
Overview
Centralizes release PR detection in a new composite action
.github/actions/is-release-pr(PR metadata, checkout head, merge-base,MetaMask/action-is-release).update-changelogsdrops its inline steps and calls this action instead, wiring job outputs from the action’shead-sha/merge-baseoutputs.The stale release closer gains a two-stage pipeline: paginated listing of open same-repo
release/*PRs, then a matrix job that runs the shared action and uploads confirmed PR numbers as artifacts. The close job only runsclose-stale-release-prs.mtswhen that list is non-empty, passingRELEASE_PR_NUMBERS. The script no longer discovers release PRs by branch name alone—it fetches each listed PR and applies fork/skip-label guards before staleness close.Docs (
releasing.md) note that auto-close uses the same release check as changelogs, not onlyrelease/*branch naming.Reviewed by Cursor Bugbot for commit 7c54446. Bugbot is set up for automated code reviews on this repo. Configure here.