Skip to content

Commit a8d9f13

Browse files
amacsmithclaude
andcommitted
ci(sync): drop auto-merge step; bot PRs await codeowner review
Auto-merge was failing with `Auto merge is not allowed for this repository (enablePullRequestAutoMerge)` even after enabling `allow_auto_merge` at the repo level. Root cause: branch protection requires codeowner review, the github-actions[bot] cannot bypass that requirement (GitHub's API silently rejects the `github-actions` slug from `bypass_pull_request_allowances.apps`), and there are no other code owners. Two paths from here, both deferred to a follow-up: 1. Provision a GitHub App owned by amacsmith with Contents:Write + PullRequests:Write permissions, install on the repo, add its slug to the bypass allowlist. The sync workflow uses actions/create-github-app-token to mint a token and the enable-pull-request-automerge step uses it. Most secure. 2. Mint a fine-grained PAT for amacsmith with the same scopes, store as secrets.BOT_PAT, use directly. Easier, less granular. Until either lands, the daily sync workflow still opens / updates a bot/sync PR; a codeowner merges it manually. Branch-protection remains intact (codeowner review required) — Scorecard Branch-Protection score stays at 7. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 777ee45 commit a8d9f13

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

.github/workflows/sync.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,14 +157,14 @@ jobs:
157157
site/badges
158158
site/.well-known
159159
160-
# pin: v3.0.0 -- peter-evans/enable-pull-request-automerge
161-
- name: Enable auto-merge
162-
if: steps.cpr.outputs.pull-request-number
163-
uses: peter-evans/enable-pull-request-automerge@a660677d5469627102a1c1e11409dd063606628d
164-
with:
165-
token: ${{ secrets.GITHUB_TOKEN }}
166-
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
167-
merge-method: squash
160+
# Auto-merge intentionally NOT enabled here. GitHub's
161+
# branch-protection bypass allowlist does not accept the built-in
162+
# `github-actions` app slug, so the bot's PR cannot satisfy
163+
# `require_code_owner_reviews`. The PR sits open until a
164+
# codeowner (amacsmith) reviews and merges manually, OR until we
165+
# wire a custom GitHub App or fine-grained PAT through
166+
# `secrets.BOT_PAT` and re-enable the enable-pull-request-automerge
167+
# step using that token.
168168

169169
- name: Trigger pages redeploy (best-effort)
170170
if: steps.diff.outputs.changed == 'true'

0 commit comments

Comments
 (0)