Repository navigation
ci: automated Claude review for PRs by chayan-bit #38
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
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,34 @@ | ||
| # Automated Claude Code review for PRs authored by chayan-bit. | ||
| # Runs on open, reopen and ready-for-review; drafts are skipped. Re-review any time by adding the `claude-review` label. | ||
| # Auth: CLAUDE_CODE_OAUTH_TOKEN secret (from `claude setup-token`) plus the Claude GitHub App installed on this repo. | ||
| name: Claude review | ||
| on: | ||
| pull_request: | ||
| types: [opened, reopened, ready_for_review, labeled] | ||
| concurrency: | ||
| group: claude-review-${{ github.event.pull_request.number }} | ||
| cancel-in-progress: true | ||
| jobs: | ||
| review: | ||
| if: >- | ||
| github.event.pull_request.user.login == 'chayan-bit' && | ||
| github.event.pull_request.draft == false && | ||
| (github.event.action != 'labeled' || github.event.label.name == 'claude-review') | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 20 | ||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
| issues: read | ||
| id-token: write | ||
| steps: | ||
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 | ||
| with: | ||
| fetch-depth: 1 | ||
| - uses: anthropics/claude-code-action@f27be6b65a4652f08a2ba3cff79114829b588967 # v1 | ||
| with: | ||
| claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} | ||
| plugin_marketplaces: "https://github.com/anthropics/claude-code.git" | ||
| plugins: "code-review@claude-code-plugins" | ||
| prompt: "/code-review:code-review --comment ${{ github.repository }}/pull/${{ github.event.pull_request.number }}" | ||
| claude_args: '--allowedTools "mcp__github_inline_comment__create_inline_comment"' | ||
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.
On every eligible PR, the
/code-reviewplugin usesgh pr view,gh pr diff, andgh pr commentto inspect and report on the PR, but this configuration only enables the inline-comment MCP tool. Bash is disabled by default in Claude Code Action unless commands are explicitly enabled throughclaude_args, so these calls are denied and the workflow can complete without producing a review. Add the plugin's requiredBash(gh ...)permissions alongside the MCP permission; the action FAQ documents the Bash restriction, and the official PR-review example allowlists the requiredgh prcommands.Useful? React with 👍 / 👎.