chore: scan more open PRs in release-branch-sync #247
Merged
Conversation
`gh pr list --state open` defaults to 30 results, so on busy repos the next release PR was often not in the result set returned to get_active_release_branches. The script then logged "No active release branches found" and exited without creating any sync PR. This bit metamask-extension after the 13.20.1 hotfix release: PR release/13.21.0 was open but not in the first 30 results, so no sync PR was auto-created and the next release branch had to be patched manually. Pass --limit 500 so the next release PR is always included, and document why in a comment so the limit isn't silently lowered later. Co-authored-by: Cursor <cursoragent@cursor.com>
chloeYue
commented
May 12, 2026
Gudahtt
reviewed
May 12, 2026
Gudahtt
previously approved these changes
May 12, 2026
Member
Gudahtt
left a comment
There was a problem hiding this comment.
LGTM! Though I had one additional suggestion
Co-authored-by: Mark Stacey <markjstacey@gmail.com>
Gudahtt
approved these changes
May 12, 2026
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.
Summary
After a release PR is merged into
stable, therelease-branch-syncaction sometimes silently exits without creating a sync PR for the next open release branch.Root cause
gh pr listdefaults to 30 results when--limitis not passed. In a busy repo, the next release PR is often older than the 30 most-recently-created open PRs and falls outside that window. The script then logs:WARNING: No active release branches found (no open/draft PRs with 'release: X.Y.Z' title) and exits cleanly, creating no sync PRs.
This is what happened after
release/13.29.0was merged on the extension repo:so i created the stable sync PR manually: chore: sync stable into release/13.29.0 metamask-extension#42124
Fix
Add
--limit 500to thegh pr listcall .Note
Low Risk
Low risk: small, scoped change to the
release-branch-syncautomation that only increases the PR scan window, with minimal behavioral impact beyond finding older release PRs in busy repos.Overview
Prevents the
release-branch-syncscript from silently missing active release PRs in repos with lots of open PRs by raisinggh pr list’s fetch size to--limit 500and documenting the rationale.Adds a corresponding Unreleased changelog entry describing the bug and fix (MCRM-66).
Reviewed by Cursor Bugbot for commit d19b27c. Bugbot is set up for automated code reviews on this repo. Configure here.