ci: respond to PR comments via claude-code-action on the Max plan#372
Open
etrobert-bot wants to merge 1 commit into
Open
ci: respond to PR comments via claude-code-action on the Max plan#372etrobert-bot wants to merge 1 commit into
etrobert-bot wants to merge 1 commit into
Conversation
Add a workflow that runs anthropics/claude-code-action@v1 on every human comment/review on a PR (issue_comment, pull_request_review_comment, pull_request_review) — no @claude mention required. Claude reads the comment in context and either pushes a fix to the PR branch or replies, following the repo's Conventional Comments convention. It never merges. Authenticated with CLAUDE_CODE_OAUTH_TOKEN so usage draws from the Claude Max subscription rather than API credits. Loop-guarded two ways: the job `if` skips bot senders, and exclude_comments_by_actor ignores Claude's own replies. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a workflow so any human comment or review on a PR is automatically addressed or answered — no
@claudemention needed. This runs on the Claude Max subscription (viaCLAUDE_CODE_OAUTH_TOKEN), not API credits, so it consumes plan capacity you've already paid for.How it works
issue_comment,pull_request_review_comment, andpull_request_review(submitted).anthropics/claude-code-action@v1with an explicitprompt: read the comment in context, then push a fix to the PR branch (for change requests/suggestions) or reply (for questions). Follows the repo's Conventional Comments convention. Never merges — a human still reviews and merges.ifskipssender.type == 'Bot', andexclude_comments_by_actorignores Claude's own replies. Per-PRconcurrencygroup prevents pile-ups.etrobert, not the bot)claude setup-tokenlocally (opens an OAuth flow, prints a long-lived token).CLAUDE_CODE_OAUTH_TOKEN(Settings → Secrets and variables → Actions).NixCI workflow. (Without the app it falls back toGITHUB_TOKEN; commits then won't re-run CI.)Until the secret exists the workflow runs but the action step fails auth — harmless, just no-ops.
Trade-offs to be aware of
@claude-only later, drop thepromptand addtrigger_phrase: "@claude".ubuntu-latest.Verified locally:
actionlintclean,nix fmt . -- --cireports 0 changed.🤖 Generated with Claude Code