ci: skip Claude workflows cleanly when CLAUDE_CODE_OAUTH_TOKEN is unset (LAC-3035) - #484
Merged
Merged
Conversation
…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>
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
This was referenced Jul 23, 2026
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>
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.
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@v1fails env validation, so every PR shows a redclaude-reviewcheck (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
secretscontext is not available in job-levelif:.)Enabling AI review (human step, tracked in LAC-3035)