Open the pin-comment repair PR with the PR bot App

Merged
JE
4h ago
+36-9

Ready: 37s-pr-bot (pull requests: write, metadata: read; no contents access) is installed, and the org secret PR_BOT_PRIVATE_KEY and variable PR_BOT_CLIENT_ID are shared with the 8 repos that mint its token.

The basecamp org is about to turn off "Allow GitHub Actions to create and approve pull requests" (Security Hardening, step 4). After that, GITHUB_TOKEN can't open the pin-comment repair PR, and this workflow fails at gh pr create.

What changes in dependabot-sync-actions-comments.yml:

  • New step Mint the PR bot token. actions/create-github-app-token is pinned to the same SHA as dependabot-sync-nix-vendor-hash.yml (bcd2ba4…, v3.2.0). It reads vars.PR_BOT_CLIENT_ID and secrets.PR_BOT_PRIVATE_KEY, is scoped to the caller repo only, and asks only for permission-pull-requests: write. It runs only when there's a repair to push.
  • gh pr create uses that token. The deploy-key push is unchanged, and arming auto-merge still uses GITHUB_TOKEN. The setting doesn't block auto-merge.
  • The author checks (the existing-PR check before the push, and the check before auto-merge is armed) take the App's slug from the token step's app-slug output, so the App's name isn't hard-coded. They also still accept app/github-actions, for a repair PR opened before the switch. That second clause can be removed once no such PR is open.
  • The step that approves held runs stays. Runs on PRs an App opens should start without being held, so the step will have nothing to do. It can be removed, along with the callers' actions: write, once a real repair PR shows its runs starting.
  • The caller-contract header names the App, the variable and the secret instead of the repository setting.

After this merges, the six callers (basecamp-cli, basecamp-sdk, cli, fizzy-cli, hey-cli, openclaw-basecamp) need their pin bumped to the merge commit. Their secrets: inherit already passes the org secret through.

actionlint and zizmor --offline report nothing on the changed file.