Skip to content

fix: only merge older RCs with open release PRs (MCRM-80) - #282

Merged
sleepytanya merged 5 commits into
mainfrom
fix/MCRM-80-merge-previous-open-rcs
Aug 26, 2026
Merged

fix: only merge older RCs with open release PRs (MCRM-80)#282
sleepytanya merged 5 commits into
mainfrom
fix/MCRM-80-merge-previous-open-rcs

Conversation

@sleepytanya

@sleepytanya sleepytanya commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

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 uses gh pr list to collect open PRs whose base is stable and whose head matches release/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.

@sleepytanya
sleepytanya requested a review from bsuv August 25, 2026 20:19
Comment thread .github/scripts/merge-previous-releases.sh Outdated
Comment thread .github/scripts/merge-previous-releases.sh Outdated
Comment thread .github/scripts/merge-previous-releases.sh
Comment thread .github/scripts/merge-previous-releases.sh Outdated
Comment thread CHANGELOG.md Outdated
Comment thread CHANGELOG.md Outdated
Gudahtt
Gudahtt previously approved these changes Aug 26, 2026

@Gudahtt Gudahtt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM!

@Gudahtt
Gudahtt dismissed their stale review August 26, 2026 17:19

I discovered this isn't actually breaking

Comment thread CHANGELOG.md Outdated
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))

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed! f8da6c3

@sleepytanya
sleepytanya merged commit 1671222 into main Aug 26, 2026
11 checks passed
@sleepytanya
sleepytanya deleted the fix/MCRM-80-merge-previous-open-rcs branch August 26, 2026 18:15
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