Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/claude-review.yml
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"'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Allow the GitHub CLI tools required by the review

On every eligible PR, the /code-review plugin uses gh pr view, gh pr diff, and gh pr comment to 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 through claude_args, so these calls are denied and the workflow can complete without producing a review. Add the plugin's required Bash(gh ...) permissions alongside the MCP permission; the action FAQ documents the Bash restriction, and the official PR-review example allowlists the required gh pr commands.

Useful? React with 👍 / 👎.

Loading