Skip to content

ci: skip Claude workflows cleanly when CLAUDE_CODE_OAUTH_TOKEN is unset (LAC-3035) - #484

Merged
lacymorrow merged 1 commit into
mainfrom
LAC-3035/claude-review-secret-guard
Jul 23, 2026
Merged

ci: skip Claude workflows cleanly when CLAUDE_CODE_OAUTH_TOKEN is unset (LAC-3035)#484
lacymorrow merged 1 commit into
mainfrom
LAC-3035/claude-review-secret-guard

Conversation

@lacymorrow

Copy link
Copy Markdown
Owner

Problem

The OAuth migration (#482) switched both Claude workflows to secrets.CLAUDE_CODE_OAUTH_TOKEN, but that repo secret was never created. anthropics/claude-code-action@v1 fails env validation, so every PR shows a red claude-review check (e.g. #483 runs 30049092906 / 30049072521). The migration PR looked green only because the action self-skips on PRs that modify workflow files.

Fix

Step-level if: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN != '' }} guards on both workflows. When the secret is missing the job skips with a ::notice:: annotation naming the fix, instead of failing. Once the secret is added the workflows run unchanged — no follow-up edit needed.

(Guards are step-level because the secrets context is not available in job-level if:.)

Enabling AI review (human step, tracked in LAC-3035)

claude setup-token   # interactive browser OAuth, Claude Max subscription
gh secret set CLAUDE_CODE_OAUTH_TOKEN -R lacymorrow/juno

…et (LAC-3035)

The claude-code-action fails env validation on every PR because the
CLAUDE_CODE_OAUTH_TOKEN repo secret was never created after the OAuth
migration (#482). Guard the steps so the jobs skip with a notice
annotation instead of failing, until the secret exists.

Co-Authored-By: Paperclip <noreply@paperclip.ing>
@gemini-code-assist

Copy link
Copy Markdown

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@lacymorrow
lacymorrow merged commit 9c0f735 into main Jul 23, 2026
3 checks passed
@lacymorrow
lacymorrow deleted the LAC-3035/claude-review-secret-guard branch July 23, 2026 22:45
lacymorrow added a commit that referenced this pull request Jul 23, 2026
… (LAC-3035) (#486)

#484 used `secrets.CLAUDE_CODE_OAUTH_TOKEN` inside step-level `if:`
expressions, which is a workflow parse error (jobless failed runs on
every push to main). Evaluate the presence check once in job-level
`env` (where secrets is allowed) and gate steps on the env var.
Validated with actionlint.

Co-authored-by: Paperclip <noreply@paperclip.ing>
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