Skip to content

ci: add Claude PR review workflow - #12

Merged
prashar32 merged 1 commit into
mainfrom
ci/claude-pr-review
May 30, 2026
Merged

ci: add Claude PR review workflow#12
prashar32 merged 1 commit into
mainfrom
ci/claude-pr-review

Conversation

@prashar32

@prashar32 prashar32 commented May 30, 2026

Copy link
Copy Markdown
Owner

Adds Claude-powered PR review using the Claude Max subscription (no ANTHROPIC_API_KEY, no API billing, no per-call cost). Two workflows:

  • claude-pr-review.yml — automatic reviewer-POV review when a PR to main is opened/reopened, with a prompt specialized to RiskKernel's invariants (deterministic-only-in-Go enforcement, no-telemetry egress, api/v1/config/forward-only-migration compatibility, safety-critical tests, tainted-input/overflow risks). Add synchronize to also review every push.
  • claude.yml — on-demand @claude on PR/review comments, locked to the maintainer: the job runs only when github.event.sender.login == 'prashar32', so nobody else can invoke Claude on this repo.

Setup required before it works

  1. Generate a subscription token locally (one-time): claude setup-token — uses the Claude Max plan, prints a long-lived token once.
  2. Add it as repo secret CLAUDE_CODE_OAUTH_TOKEN (Settings → Secrets and variables → Actions).
  3. Install the Claude GitHub App: https://github.com/apps/claude

Auth is claude_code_oauth_token (not anthropic_api_key). Permissions are scoped to contents: read + pull-requests: write (+ issues: write for the @claude flow). Neither workflow is a required status check, so they don't block merges.

Two workflows, both authenticated with the Claude Max subscription via
CLAUDE_CODE_OAUTH_TOKEN (generated locally with `claude setup-token`) — no
ANTHROPIC_API_KEY, no API billing, no per-call cost:

- claude-pr-review.yml — automatic reviewer-POV review when a PR to main is
  opened/reopened, specialized to RiskKernel's invariants.
- claude.yml — on-demand "@claude" trigger on PR/review comments, locked to the
  maintainer (github.event.sender.login == 'prashar32'), so only the owner can
  invoke Claude on this repo.

Setup: add the CLAUDE_CODE_OAUTH_TOKEN repo secret and install the Claude GitHub
App. Permissions scoped to contents:read + pull-requests:write (+issues:write
for the @claude flow).
@prashar32
prashar32 force-pushed the ci/claude-pr-review branch from 97049d9 to 5424f7e Compare May 30, 2026 19:34
@prashar32

Copy link
Copy Markdown
Owner Author

@claude

@prashar32
prashar32 merged commit 62e1cf2 into main May 30, 2026
4 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