Skip to content

infra: install Claude GitHub App, locked to one account - #3

Merged
idIing merged 1 commit into
mainfrom
infra/claude-github-app
Sep 4, 2026
Merged

idIing merged 1 commit into
mainfrom
infra/claude-github-app

Conversation

@idIing

@idIing idIing commented Sep 4, 2026

Copy link
Copy Markdown
Owner

What

Adds .github/workflows/claude.yml from the official anthropics/claude-code-action setup guide, so @claude on an issue/PR comment triggers a Claude Code review under its own GitHub App identity — separate from any commit made with this box's own PAT.

Why manual, not /install-github-app

That command's own secret-write step 403'd on this repo: the box's fine-grained PAT has push/admin but not the separate Actions-secrets write permission. Rather than widen the PAT's scope for a one-time write, this PR just commits the workflow file (a normal push); the ANTHROPIC_API_KEY secret still needs to be added by hand.

Access lock

The job condition checks github.event.*.user.id == 103786821idIing's numeric GitHub account id, not the login string — on top of the action's own built-in write-access requirement. Two effects:

  • No other collaborator's @claude mention can trigger a run and spend this repo's API usage.
  • A future username rename needs no edit here.

Still needed before this does anything

Repo Settings -> Secrets and variables -> Actions -> New repository secret: ANTHROPIC_API_KEY (or CLAUDE_CODE_OAUTH_TOKEN). Neither this PR nor this box ever holds that value.

🤖 Generated with Claude Code

/install-github-app's own secret-write step 403'd — the box's fine-grained
PAT has push/admin but not the separate Actions-secrets permission block.
Committing the workflow directly (push works fine); the ANTHROPIC_API_KEY
secret still needs to be added by hand in Settings -> Secrets and variables
-> Actions, since that's cleaner than widening the PAT's scope for it.

Gated to github.event.*.user.id == 103786821 (idIing's numeric GitHub id,
not the login string) on top of the action's own built-in write-access
check, so no other collaborator's @claude mention can spend this repo's
API usage, and a future username change needs no edit here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@idIing
idIing merged commit 7bc3ecd into main Sep 4, 2026
2 checks passed
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