Skip to content

ci: authenticate the review action with a Claude Code OAuth token - #11

Merged
jacobyoby merged 1 commit into
mainfrom
ci/oauth-token
Sep 11, 2026
Merged

jacobyoby merged 1 commit into
mainfrom
ci/oauth-token

Conversation

@jacobyoby

Copy link
Copy Markdown
Contributor

The API-key path requires a prepaid credit balance — PR #8 failed with "Your credit balance is too low to access the Anthropic API" even though the key itself was valid. The org is on a Claude subscription, so switch the action to claude_code_oauth_token, reading a CLAUDE_CODE_OAUTH_TOKEN secret generated by claude setup-token.

The skip-when-unset gate is unchanged: no secret, no review, no red check.

The review will not run on this PR (the action refuses when the workflow file differs from main); it will run on #8 after merge, once the secret is set.

🤖 Generated with Claude Code

https://claude.ai/code/session_017RYiDstNPvrtMqDr3cEqY4

The API key path needs a prepaid credit balance; the org uses a Claude
subscription. Switch the action to claude_code_oauth_token, reading
CLAUDE_CODE_OAUTH_TOKEN (from `claude setup-token`). Same skip-when-unset
gate as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017RYiDstNPvrtMqDr3cEqY4
@jacobyoby
jacobyoby merged commit e628cc1 into main Sep 11, 2026
1 check passed
@jacobyoby
jacobyoby deleted the ci/oauth-token branch September 11, 2026 04:56
jacobyoby pushed a commit that referenced this pull request Sep 11, 2026
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
jacobyoby pushed a commit to jacobrakaiFoundation/beanstalk that referenced this pull request Sep 11, 2026
Same change as jacobrakaiFoundation/.github#11 and #10: the API-key path
needs a prepaid credit balance the org does not carry, so the action fails
in under a second with is_error:true. Read CLAUDE_CODE_OAUTH_TOKEN (from
`claude setup-token`) instead, with the same skip-when-unset gate.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VzsJf6bUyYZdq3kxJ8DGix
jacobyoby added a commit that referenced this pull request Sep 11, 2026
* ci: add @claude on-demand alongside the automatic review

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

* ci: authenticate @claude with the Claude Code OAuth token

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
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