fix: create_pr_if_not_exists check for closed/merged branches too#208
Merged
HowardBraham merged 2 commits intomainfrom Jan 29, 2026
Merged
fix: create_pr_if_not_exists check for closed/merged branches too#208HowardBraham merged 2 commits intomainfrom
HowardBraham merged 2 commits intomainfrom
Conversation
Contributor
|
The linked test somehow took 54 minutes to run https://github.com/consensys-test/metamask-extension-infra-3257/actions/runs/21397035008/job/61709774559 Is that because it's trying to construct a CHANGELOG from the beginning of time? |
Contributor
Author
hey @HowardBraham , yes that's a side effect of testing in a fork and not related to the change itself. |
HowardBraham
approved these changes
Jan 29, 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.
Description
Fixes an issue where a duplicate changelog PR is created immediately after merging an existing changelog PR into a release branch.
Problem
When a changelog PR (e.g.,
release/13.14.1-Changelog) is merged:update-release-changelogworkflow triggerscreate_pr_if_not_exists()checks for existing PRs usinggh pr listgh pr listonly returns open PRs by default — the merged PR is not foundSolution
Added
--state allflag togh pr listcommands increate_pr_if_not_exists()to include merged/closed PRs in the search.Tested here: https://github.com/consensys-test/metamask-extension-infra-3257/actions/runs/21397035008/job/61709774559
Note
Low Risk
Low risk shell script change that only broadens PR existence checks in GitHub CLI calls; main risk is unexpected behavior if multiple historical PRs match the same head name.
Overview
Prevents release automation from creating duplicate PRs by updating
create_pr_if_not_exists()in.github/scripts/utils.shto havegh pr listinclude closed and merged PRs via--state allwhen checking for an existing PR.Written by Cursor Bugbot for commit 3460650. This will update automatically on new commits. Configure here.