Repository navigation
feat(ci): configure automated provider fallback for PR reviews - #18
Merged
Merged
Conversation
Update workflow configurations in .github/workflows/pr-review.yml and template/.github/workflows/pr-review.yml to use provider: 'auto'. This leverages menil/pr-code-review-action's native support for automated fallback from Claude (OAuth token or API key) to OpenRouter on token errors, credit balance depletion, or 5xx server outages. Update README.md, template/README.md.jinja, and create-project.sh to document automated fallback and secrets configuration. AI-Reasoning: https://github.com/menil/project-template/blob/ai-reasoning/feat-auto-provider-pr-review.md
There was a problem hiding this comment.
Code Review Summary
Needs Attention (0 issues)
No critical issues found.
Suggestions (1 items)
- [Dependency] Pin Action Version (LOW impact, LOW effort) - .github/workflows/pr-review.yml:20
Using@mainfor the action version can lead to unstable builds if the action author pushes a breaking change. Consider pinning to a specific commit SHA or semantic version.
All Clear
Correctness, Static Analysis, Security, Quality, Performance, and PII Detection passed.
Verdict: Ready to Merge
The changes simplify the provider selection logic and update the documentation accordingly.
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
Configures
provider: 'auto'in both the repository's own PR code review workflow and the template workflow rendered for downstream Copier projects.With
menil/pr-code-review-action@mainnow natively supporting automated provider candidate evaluation and fallback, settingprovider: 'auto'allows the action to:CLAUDE_CODE_OAUTH_TOKENfirst, thenANTHROPIC_API_KEYif configured).OPENROUTER_API_KEYupon encountering token/authentication errors, Anthropic credit exhaustion (HTTP 400 credit balance), or 5xx server outages.provider: ${{ ... && 'anthropic' || 'openrouter' }}), which previously forcedprovider: 'anthropic'whenever an Anthropic credential was set and prevented runtime fallback to OpenRouter.Changes
.github/workflows/pr-review.ymlandtemplate/.github/workflows/pr-review.ymlto setprovider: 'auto'with explanatory comments.README.mdandtemplate/README.md.jinjato describe the automated fallback functionality and updated secret definitions.scripts/create-project.shcompletion message to mentionANTHROPIC_API_KEY(orCLAUDE_CODE_OAUTH_TOKEN) and/orOPENROUTER_API_KEY.Verification
just validatevianix-shellverifying:.claude/settings.jsonsync with.agentignore).AI-Reasoning: https://github.com/menil/project-template/blob/ai-reasoning/feat-auto-provider-pr-review.md