Repository navigation
ci: automated PR reviews (Claude, CodeRabbit, Gemini) #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # CodeRabbit config. Install the app: https://github.com/apps/coderabbitai | ||
| language: en-US | ||
| reviews: | ||
| profile: chill | ||
| request_changes_workflow: false | ||
| high_level_summary: true | ||
| poem: false | ||
| review_status: true | ||
| collapse_walkthrough: true | ||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| chat: | ||
| auto_reply: true |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # Gemini Code Assist config. Install the app: https://github.com/apps/gemini-code-assist | ||
| have_fun: false | ||
| code_review: | ||
| disable: false | ||
| comment_severity_threshold: MEDIUM | ||
| max_review_comments: -1 | ||
| pull_request_opened: | ||
| help: false | ||
| summary: true | ||
| code_review: true |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| name: Claude PR Review | ||
|
|
||
| # Runs on the repo owner's Claude subscription (CLAUDE_CODE_OAUTH_TOKEN from | ||
| # `claude setup-token`), not paid API credits. Triggers are kept narrow to save | ||
| # plan quota: new / ready / reopened PRs, plus the `claude-review` label to re-run. | ||
| on: | ||
| pull_request: | ||
| types: [opened, ready_for_review, reopened, labeled] | ||
|
|
||
| concurrency: | ||
| group: claude-review-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| review: | ||
| # Skip drafts, PRs from forks (no secret access), and unrelated label events. | ||
| if: >- | ||
| github.event.pull_request.draft == false && | ||
| github.event.pull_request.head.repo.full_name == github.repository && | ||
| (github.event.action != 'labeled' || github.event.label.name == 'claude-review') | ||
|
Comment on lines
+10
to
+20
|
||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: write | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 1 | ||
|
|
||
| - uses: anthropics/claude-code-action@v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| github_token: ${{ secrets.GITHUB_TOKEN }} | ||
| prompt: | | ||
| REPO: ${{ github.repository }} | ||
| PR NUMBER: ${{ github.event.pull_request.number }} | ||
|
|
||
| Review this pull request. Read AGENTS.md / CONTRIBUTING.md first if present | ||
| and hold the change to the repo's own conventions. | ||
|
|
||
| Focus on, in order: correctness bugs, security problems, broken invariants | ||
| or contracts, missing tests for changed behavior, and performance regressions. | ||
| Skip formatting and style nitpicks that linters already catch. | ||
|
|
||
| Leave an inline comment for each concrete issue on the exact line, saying what | ||
| breaks and how to fix it. Then post one short summary comment with | ||
| `gh pr comment`. If you find nothing worth flagging, say so in one line. | ||
| claude_args: | | ||
| --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Glob,Grep" | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move concurrency into the filtered review job.
If someone adds an unrelated label while a review runs, the new workflow enters the same concurrency group and cancels the active review. Its own review job then skips because of Line 20. The PR receives no completed replacement review. Workflow-level concurrency applies to the workflow, not only eligible jobs. Move this block under
jobs.reviewso skipped label events do not cancel reviews. (docs.github.com)