ci: support Claude Code OAuth review auth#38
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Claude Code Review GitHub Actions workflow to support authenticating via Claude Code OAuth when available, while retaining the existing API-key + base-URL fallback without letting OAuth inherit any custom proxy base URL.
Changes:
- Add secret-presence flags (
HAS_*) and update step gating to allow either OAuth or API-key auth. - Split the review execution into two paths: “with OAuth” vs “with API key”, scoping
ANTHROPIC_BASE_URLonly to the API-key fallback. - Keep the “self-change” guard so the workflow won’t review PRs that modify the workflow itself.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ) && | ||
| steps.claude-workflow-change.outputs.self_changed != 'true' | ||
| }} | ||
| uses: actions/checkout@v6 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #38 +/- ##
=======================================
Coverage 91.22% 91.22%
=======================================
Files 81 81
Lines 3464 3464
=======================================
Hits 3160 3160
Misses 304 304
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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.
Summary
CLAUDE_CODE_OAUTH_TOKENfor Claude Code Review when configured.ANTHROPIC_API_KEY+ANTHROPIC_BASE_URLpath when OAuth is not configured.ANTHROPIC_BASE_URLscoped to the API-key fallback so OAuth does not inherit the proxy endpoint.Validation
ruby -e 'require "yaml"; YAML.load_file(".github/workflows/claude-code-review.yml"); puts "yaml ok"'\n-python /Users/maple/.codex/skills/voscript-api/scripts/public_release_scan.py --root /Users/maple/Documents/GitHub/.worktrees/voscript-fix-claude-oauth-review\n\n## Note\nThis PR changes the Claude review workflow itself, so the workflow self-change guard is expected to skip Claude review for this PR. Future non-workflow PRs can use the OAuth path onceCLAUDE_CODE_OAUTH_TOKENis configured.