feat(release): add prerelease_backmerge_sync_enabled input (opt-in, default false) - #542
Merged
Merged
Conversation
WalkthroughAdds a ChangesBackmerge sync toggle
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Contributor
🛡️ CodeQL Analysis ResultsLanguages analyzed: ✅ No security issues found. 🔍 View full scan logs | 🛡️ Security tab |
Contributor
🔍 Lint Analysis
|
Contributor
🔍 PR Validation Summary✅ PR Mergeable — no blocking failures
|
…efault false) backmerge_enabled currently gates two unrelated behaviors under one flag: 1. the post-release backmerge on backmerge_source (e.g. main) right after a stable release — proactive, low blast radius (only runs when a release just happened on that branch). 2. the pre-version-calculation sync on prerelease branches (develop, release-candidate) — reactive, can skip/block a release on ANY push to those branches if backmerge_source has diverged, regardless of what the triggering commit actually touched. Callers who want (1) without (2) had no way to disable just the reactive part — backmerge_enabled: false disables both. Adds prerelease_backmerge_sync_enabled, defaulting to false (opt-in), to independently gate the pre_sync step in release.yml, and exposes it as a pass-through input in go-release.yml. Defaulting to false means existing callers stop being subject to this pre-version-calculation sync/skip unless they explicitly opt in with true; the post-release backmerge on backmerge_source is unaffected either way. Also documents the pre-existing (undocumented) prerelease_branches input in docs/release-workflow.md while touching that table.
bedatty
force-pushed
the
feat/prerelease-backmerge-sync-toggle
branch
from
July 3, 2026 17:23
c1c98bf to
6e47169
Compare
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.
Context
backmerge_enabledcurrently gates two unrelated behaviors under a single flag:backmerge_source(e.g.main) right after a stable release — proactive, low blast radius (only fires when a release just happened on that branch).develop,release-candidate) — reactive: mergesbackmerge_sourcein before calculating the next version, and skips/blocks the release for that run (opening a PR instead) if the merge can't complete directly. This can fire on any push to those branches, regardless of what the triggering commit touches — surfaced this inplugin-br-pix-indirect-btg(bumping tov1.42.0blocked an unrelated CI-only PR's release becausemain/develophad drifted for months).Callers who want (1) without (2) had no way to disable just the reactive part —
backmerge_enabled: falsedisables both.Changes
prerelease_backmerge_sync_enabled(boolean, defaultfalse, opt-in) torelease.yml, gating thepre_syncstep independently:if: inputs.backmerge_enabled && inputs.prerelease_backmerge_sync_enabled && ....go-release.yml.prerelease_branchesinput) indocs/release-workflow.md.Behavior
false): the pre-version-calculation sync never runs. Callers keep computing the next prerelease version from local branch history only — no skip/block, no automatic PR againstdevelop/release-candidate. The post-release backmerge onbackmerge_source(e.g. right after amainhotfix) is unaffected either way.true): restores the pre-sync check for callers who want the stricter guarantee (next prerelease version always calculated against adevelop/release-candidatethat's up to date withbackmerge_source).Note on defaulting to false
This input is new, so there's no existing caller relying on the pre-sync behavior via this specific flag — defaulting to
falsehere doesn't silently change anyone's pinned behavior. It does mean callers who upgrade to a version ofgo-release.yml/release.ymlwhere the underlyingpre_syncstep first shipped (v1.41.0+) and want that stricter guarantee need to explicitly opt in withprerelease_backmerge_sync_enabled: true.Verification
python3 -c "import yaml; yaml.safe_load(open('.github/workflows/release.yml'))"/ same forgo-release.yml— both parse cleanly.steps.pre_sync.outputs.action(the "warn about pending sync", "determine next version (dry-run)", and "Semantic Release" steps) — all treat a skippedpre_syncstep the same asactionnot beingpr-opened/pr-existing(empty string), so disabling the step falls through to normal version calculation, as intended.