Skip to content

ci: bypass branch policy when merging the release PR - #31

Merged
jflayhart merged 1 commit into
mainfrom
ci/release-merge-admin-bypass
Jun 10, 2026
Merged

ci: bypass branch policy when merging the release PR#31
jflayhart merged 1 commit into
mainfrom
ci/release-merge-admin-bypass

Conversation

@jflayhart

Copy link
Copy Markdown
Contributor

The main ruleset requires 1 review + code-owner review and only allows the merge-commit method, while the repo only enables squash — the bot's plain gh pr merge --squash is always rejected with 'base branch policy prohibits the merge' (human merges have been silently bypassing as org admins).

Fix: in CI, try a plain merge first, fall back to --admin (RELEASE_PLEASE_TOKEN). Authorized to keep the ruleset strict for outside contributors while letting the release bot through.

Merging this triggers Release Please, which will pick up the dangling release PR and merge it in CI — cutting the pending release automatically.

The main ruleset requires reviews and only allows the merge-commit method;
the bot token cannot satisfy it, so the release PR merge fails with 'base
branch policy prohibits the merge'. Fall back to an admin-bypass merge in CI
using RELEASE_PLEASE_TOKEN.
@jflayhart
jflayhart merged commit 40e2e5f into main Jun 10, 2026
5 checks passed
@jflayhart
jflayhart deleted the ci/release-merge-admin-bypass branch June 10, 2026 13:03
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.

1 participant