fix: only merge older RCs with open release PRs (MCRM-80) - #282
Merged
Conversation
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
reviewed
Aug 26, 2026
Gudahtt
dismissed
their stale review
August 26, 2026 17:19
I discovered this isn't actually breaking
Gudahtt
reviewed
Aug 26, 2026
Comment on lines
+10
to
+13
| ### Changed | ||
|
|
||
| - **BREAKING:** `merge-previous-releases` now requires `GITHUB_TOKEN` to query open release PRs via GitHub API ([#282](https://github.com/MetaMask/github-tools/pull/282)) | ||
|
|
Member
There was a problem hiding this comment.
Suggested change
| ### Changed | |
| - **BREAKING:** `merge-previous-releases` now requires `GITHUB_TOKEN` to query open release PRs via GitHub API ([#282](https://github.com/MetaMask/github-tools/pull/282)) |
Sorry for the mixup, I just discovered this isn't actually a breaking change. The new requirement of the GITHUB_TOKEN for this script doesn't impact the action, because it already required GITHUB_TOKEN to checkout this repo itself
Gudahtt
approved these changes
Aug 26, 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.
The merge-previous-releases workflow was merging all older release/* branches, including obsolete ones already merged to stable. Now it queries GitHub for open/draft PRs targeting stable and only merges those active RCs.
https://consensyssoftware.atlassian.net/browse/MCRM-80
Note
Medium Risk
Changes release-branch merge automation in CI; wrong PR filtering or
gh/token failures could skip needed merges or block new release setup.Overview
The merge-previous-releases script no longer merges every older
release/*remote branch into a newly cut release branch. It now usesgh pr listto collect open PRs whose base isstableand whose head matchesrelease/X.Y.Z, then merges only those active RCs that are still older than the new branch (same version sort and conflict handling as before).If the GitHub API query fails (e.g. token permissions), the script exits with an error instead of silently skipping merges. Docs and log messages were updated accordingly, and CHANGELOG records the fix under Unreleased.
Reviewed by Cursor Bugbot for commit f8da6c3. Bugbot is set up for automated code reviews on this repo. Configure here.