Repository navigation
ci: add @claude on-demand alongside the automatic review - #10
Merged
Merged
Conversation
claude.yml runs Claude in tag mode: only when someone with write access writes `@claude` in an issue, pull request comment or review. The job is gated on the mention itself, so ordinary comments never start a runner, and there is no `prompt` input — a prompt is what would turn this into an every-event automation. It sits beside claude-code-review.yml rather than replacing it; dropping the automatic review later is deleting one file. `id-token: write` is included. I removed it from the review workflow earlier as unused and #9 restored it — correctly: the action exchanges the workflow's OIDC token to post as the Claude GitHub App, so tag mode needs it as well. Skips green while ANTHROPIC_API_KEY is not visible to this repository. Actions pinned to commit SHAs; the claude-code-action pin is the commit its annotated v1 tag dereferences to, not the tag object. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix
|
Claude encountered an error after 0s —— View job I'll analyze this and get back to you. |
Follow #11: the review action now reads CLAUDE_CODE_OAUTH_TOKEN because the API-key path needs a prepaid credit balance the org does not carry — the first real review run on this PR failed after 435 ms with is_error:true and zero cost. Use the same secret and the same skip-when-unset gate here so the two workflows cannot drift apart on how they authenticate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix
8 of 17 tasks
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
claude.yml: Claude in tag mode. It runs only when someone with write access writes@claudein an issue, pull request comment or review — a question gets answered in the thread; an instruction gets a branch pushed. It does not run on pushes.Why on demand
The automatic review in
claude-code-review.ymlruns on every push to every PR. That's the right default for the front-door page, but it's also the only thing in either repo that costs real money.@claudecosts nothing until someone asks for it. This PR adds the on-demand path beside the automatic one rather than replacing it — dropping the automatic review later is deleting one file.How it stays cheap and safe
contains(…, '@claude')), so ordinary comments never start a runner.promptinput, deliberately. A prompt is what turns the action into an every-event automation.allowed_non_write_usersis not set and must not be on a public repo.CLAUDE_CODE_OAUTH_TOKENisn't visible, same gate as the review workflow.timeout-minutes: 30;concurrencykeyed per issue/PR.Authentication follows #11
The first real run of the review action on this PR failed after 435 ms with
is_error: trueandtotal_cost_usd: 0— the API-key path needs a prepaid credit balance, which #8 surfaced as "Your credit balance is too low". #11 moved the review workflow toclaude_code_oauth_token/CLAUDE_CODE_OAUTH_TOKEN(fromclaude setup-token, billed to the subscription). This workflow reads the same secret with the same skip-when-unset gate, so the two cannot drift apart on how they authenticate.mainis merged into this branch so the review check re-runs on the OAuth path.A correction to my earlier change
This includes
id-token: write. I removed it from the review workflow earlier as unused, and #9 restored it — correctly. The action exchanges the workflow's OIDC token to post as the Claude GitHub App rather thangithub-actions[bot], so tag mode needs it too. The permissions here follow the action's documented tag-mode template:contents: write(it pushes branches when asked to make a change),pull-requests: write,issues: write,id-token: write.Pins
actions/checkoutv7.0.1 andanthropics/claude-code-actionv1 by commit SHA. The action'sv1is an annotated tag, so the pin is the commit it dereferences to, not the tag object.Verification
YAML parses; the job has an
ifgate and a timeout; bothuses:are SHA-pinned with the version in a trailing comment; the file is byte-identical to the copy proposed for beanstalk in jacobrakaiFoundation/beanstalk#125.🤖 Generated with Claude Code
https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix
Generated by Claude Code