feat(release): add auto-merge-level input for release-please PRs - #185
Merged
Conversation
Add an `auto-merge-level` input (none, patch, minor, major; default none) to the release-please reusable workflow. When set, the workflow enables GitHub auto-merge (`gh pr merge --auto --squash`) on the open release-please PR when the PR's bump is no larger than the configured ceiling, so it merges once CI passes. The bump is derived from `.release-please-manifest.json` (next version on the PR head branch vs. current version on the base branch), so it is independent of each caller's PR-title configuration. Auto-merge is reconciled on every run: if a PR's bump grows past the ceiling before it is merged, auto-merge is disabled again. The merge runs with the release-please GitHub App token, so it is attributed to the App. The App must be granted bypass on branch protection and the repo must have "Allow auto-merge" enabled.
If a consuming repo hasn't enabled "Allow auto-merge" or hasn't granted the release-please App branch-protection bypass, enabling auto-merge on the release PR should not fail the whole release workflow run. Soft-fail the `gh pr merge --auto` call with a ::warning:: annotation instead, so the misconfiguration is surfaced without breaking the release.
QuentinBisson
approved these changes
May 27, 2026
QuentinBisson
left a comment
Contributor
There was a problem hiding this comment.
LGTM at first glance :)
… is none Address two code-review findings on the auto-merge reconcile step: - Soft-fail the `gh pr merge --disable-auto` call with a ::warning:: annotation, symmetrically with the enable path, so a transient API error or a race doesn't hard-fail the release run. - Guard the step with `inputs.auto-merge-level \!= 'none'`, so the default `none` is a true no-op and never disables an auto-merge that was enabled outside this workflow.
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.
What
Adds an
auto-merge-levelinput (none,patch,minor,major; defaultnone) to therelease.yamlrelease-please reusable workflow. When set, the workflow enables GitHub auto-merge (gh pr merge --auto --squash) on the open release-please PR when the PR's bump is no larger than the configured ceiling, so the PR merges automatically once CI passes.How it works
.release-please-manifest.json— the next version on the PR head branch vs. the current version on the base branch — so it is independent of each caller's release-please PR-title configuration.1 ≤ bump_level ≤ auto-merge-level, using the orderingnone(0) < patch(1) < minor(2) < major(3).patch→major) before it is merged, auto-merge is disabled again.release-pleaseGitHub App token, so the commits, the PR, and the merge are all attributed to the App.Test scenarios (latest release
1.3.1)auto-merge-levelOperational prerequisites (per consuming repo, outside this workflow)
release-pleaseGitHub App must be granted bypass on the branch protection rule / ruleset.The default
nonepreserves the previous behaviour, so existing callers are unaffected until they opt in.