Skip to content

Commit a149609

Browse files
prrao87claude
andauthored
ci: use --admin to merge OpenAPI sync PR past branch protection (#288)
The immediate `gh pr merge` was rejected by the base-branch policy (required status check), since the merge API enforces branch protection unless a bypass is requested. Checks are already confirmed green by the preceding `gh pr checks --watch --fail-fast`, so the admin bot token can safely bypass on the final merge call. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent f477f9f commit a149609

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

.github/workflows/sync-openapi.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,7 @@ jobs:
5757
sleep 15
5858
done
5959
gh pr checks "$pr" -R "$GITHUB_REPOSITORY" --watch --fail-fast --interval 30
60-
gh pr merge "$pr" -R "$GITHUB_REPOSITORY" --squash --delete-branch
60+
# --admin bypasses the "require status check" base-branch policy on the
61+
# immediate merge. Safe here: checks are already confirmed green above, and
62+
# the bot token (admin) only ever merges this one bot-generated sync PR.
63+
gh pr merge "$pr" -R "$GITHUB_REPOSITORY" --squash --delete-branch --admin

0 commit comments

Comments
 (0)