From f033c676c58fc4913987dc0ce3f74b3977f372d2 Mon Sep 17 00:00:00 2001 From: Chayan Aggarwal Date: Sun, 18 Oct 2026 05:43:00 +0530 Subject: [PATCH] ci: add automated Claude review for PRs by chayan-bit --- .github/workflows/claude-review.yml | 34 +++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/claude-review.yml diff --git a/.github/workflows/claude-review.yml b/.github/workflows/claude-review.yml new file mode 100644 index 0000000..e245d39 --- /dev/null +++ b/.github/workflows/claude-review.yml @@ -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"'