Use centralized Claude Code Review workflow#110
Conversation
Replace inline review config with a call to the shared reusable workflow. Removes hardcoded model so reviews use Claude Code's default (currently Opus 4.6). Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR centralizes the “Claude Code Review” GitHub Action by replacing the repo’s inline workflow steps with a call to the shared reusable workflow in shakacode/.github.
Changes:
- Replaced the local
claude-code-reviewjob implementation with a reusable workflow invocation. - Removed the previously hardcoded model/args configuration in favor of the shared workflow defaults.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options | ||
| claude_args: '--model claude-sonnet-4-5-20250929 --allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' | ||
|
|
||
| uses: shakacode/.github/.github/workflows/claude-code-review.yml@main |
There was a problem hiding this comment.
The reusable workflow is referenced via @main, which is mutable and can change behavior (or be compromised) without any change in this repo. Pin to an immutable ref (a tag like vX.Y.Z or a commit SHA) so runs are reproducible and reduce supply-chain risk—especially since this PR already depends on shakacode/.github#4 being merged.
| uses: shakacode/.github/.github/workflows/claude-code-review.yml@main | |
| uses: shakacode/.github/.github/workflows/claude-code-review.yml@v1 |
| claude-review: | ||
| # Optional: Filter by PR author | ||
| # if: | | ||
| # github.event.pull_request.user.login == 'external-contributor' || | ||
| # github.event.pull_request.user.login == 'new-developer' || | ||
| # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' | ||
|
|
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: read | ||
| pull-requests: read | ||
| issues: read | ||
| id-token: write | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - name: Run Claude Code Review | ||
| id: claude-review | ||
| uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| prompt: | | ||
| REPO: ${{ github.repository }} | ||
| PR NUMBER: ${{ github.event.pull_request.number }} | ||
|
|
||
| Please review this pull request and provide feedback on: | ||
| - Code quality and best practices | ||
| - Potential bugs or issues | ||
| - Performance considerations | ||
| - Security concerns | ||
| - Test coverage | ||
|
|
||
| Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback. | ||
|
|
||
| Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR. | ||
|
|
||
| # See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md | ||
| # or https://docs.claude.com/en/docs/claude-code/sdk#command-line for available options | ||
| claude_args: '--model claude-sonnet-4-5-20250929 --allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"' | ||
|
|
||
| uses: shakacode/.github/.github/workflows/claude-code-review.yml@main | ||
| secrets: | ||
| CLAUDE_CODE_OAUTH_TOKEN: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} |
There was a problem hiding this comment.
This workflow no longer declares permissions for the job. In GitHub Actions, the called reusable workflow cannot elevate GITHUB_TOKEN permissions beyond what the caller grants, and the defaults can vary by repo/org settings. Consider explicitly setting the minimal required permissions here (similar to .github/workflows/claude.yml lines 21-26) to make the workflow deterministic and avoid unexpected failures when commenting on PRs or reading issues.
Summary
shakacode/.githubshakacode/.githubDependencies
Test plan
🤖 Generated with Claude Code