Skip to content

chore: scan more open PRs in release-branch-sync #247

Merged
chloeYue merged 4 commits into
mainfrom
mcrm-66/release-branch-sync-pr-list-limit
May 12, 2026
Merged

chore: scan more open PRs in release-branch-sync #247
chloeYue merged 4 commits into
mainfrom
mcrm-66/release-branch-sync-pr-list-limit

Conversation

@chloeYue
Copy link
Copy Markdown
Contributor

@chloeYue chloeYue commented May 12, 2026

Summary

After a release PR is merged into stable, the release-branch-sync action sometimes silently exits without creating a sync PR for the next open release branch.

Root cause

gh pr list defaults to 30 results when --limit is 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.0 was merged on the extension repo:

Fix

Add --limit 500 to the gh pr list call .


Note

Low Risk
Low risk: small, scoped change to the release-branch-sync automation that only increases the PR scan window, with minimal behavioral impact beyond finding older release PRs in busy repos.

Overview
Prevents the release-branch-sync script from silently missing active release PRs in repos with lots of open PRs by raising gh pr list’s fetch size to --limit 500 and 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.

`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 chloeYue marked this pull request as draft May 12, 2026 09:48
@chloeYue chloeYue marked this pull request as ready for review May 12, 2026 10:11
@chloeYue chloeYue changed the title fix: scan more open PRs in release-branch-sync (MCRM-66) fix: scan more open PRs in release-branch-sync May 12, 2026
Comment thread .github/scripts/release-branch-sync.sh
@chloeYue chloeYue requested a review from Gudahtt May 12, 2026 10:26
@chloeYue chloeYue changed the title fix: scan more open PRs in release-branch-sync chore: scan more open PRs in release-branch-sync May 12, 2026
Comment thread .github/scripts/release-branch-sync.sh
Gudahtt
Gudahtt previously approved these changes May 12, 2026
Copy link
Copy Markdown
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Though I had one additional suggestion

Co-authored-by: Mark Stacey <markjstacey@gmail.com>
@chloeYue chloeYue merged commit ed7259c into main May 12, 2026
10 checks passed
@chloeYue chloeYue deleted the mcrm-66/release-branch-sync-pr-list-limit branch May 12, 2026 16:39
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.

2 participants