lock-release.yml: Fix auto-merge not triggering by turning it off and on again#7720
Merged
siddharthkp merged 3 commits intomainfrom Apr 10, 2026
Merged
lock-release.yml: Fix auto-merge not triggering by turning it off and on again#7720siddharthkp merged 3 commits intomainfrom
siddharthkp merged 3 commits intomainfrom
Conversation
…esets (#…" This reverts commit f441841.
|
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the release lock workflow to fix GitHub auto-merge not triggering after ruleset changes by re-toggling auto-merge on eligible PRs when unlocking the release.
Changes:
- Replaces “update branch” behavior with disabling and re-enabling auto-merge on approved, main-targeting PRs that already have auto-merge configured.
- Adjusts log output to reflect the new behavior.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/lock-release.yml | When unlocking rulesets, re-enables auto-merge on qualifying PRs instead of updating branches to retrigger evaluation. |
Copilot's findings
- Files reviewed: 1/1 changed files
- Comments generated: 1
TylerJDev
approved these changes
Apr 10, 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.
Problem:
If the main branch is locked by rulesets, enabling auto merge on a pull request says it will be merged. But it's not merged when the main branch is unlocked.
This is because auto merge is not reevaluated when the rule set changes. Right now, we try to solve this problem by merging main into pull requests that are marked for auto-merge because a new commit + CI will trigger auto-merge. But, this doesn't work for us because the integration tests require you to run them again, because of a new commit, blocking auto-merge.
Solution
Instead of merging main, if we remove the pull request from auto merge and then put it back in auto merge, that solves the problem. Classic have you tried turning it off and on again.
Rollout strategy
Testing & Reviewing
Tested by running the action from this branch: https://github.com/primer/react/actions/runs/24237799981/job/70764667067#step:4:16