From 6867128dc59a6d73bcd9b4e5dc14f749d0c2f58f Mon Sep 17 00:00:00 2001 From: Matthew Ezra Labre Date: Thu, 21 May 2026 09:19:49 +0800 Subject: [PATCH] Added: claude auto reviewer workflow --- .github/workflows/claude-auto-reviewer.yml | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 .github/workflows/claude-auto-reviewer.yml diff --git a/.github/workflows/claude-auto-reviewer.yml b/.github/workflows/claude-auto-reviewer.yml new file mode 100644 index 0000000..e5d76b2 --- /dev/null +++ b/.github/workflows/claude-auto-reviewer.yml @@ -0,0 +1,43 @@ +name: Claude Auto Review +on: + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + +jobs: + review: + if: github.event.pull_request.draft == false + runs-on: ubuntu-latest + timeout-minutes: 15 + concurrency: + group: claude-review-${{ github.event.pull_request.number }} + cancel-in-progress: true + permissions: + contents: read + pull-requests: write + steps: + - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 + with: + fetch-depth: 1 + + - uses: anthropics/claude-code-action@1dc994ee7a008f0ecc866d9ac23ef036b7229f84 # v1.0.127 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} + prompt: | + REPO: ${{ github.repository }} + PR NUMBER: ${{ github.event.pull_request.number }} + + Please review this pull request with a focus on: + - Code quality and best practices + - Potential bugs or issues + - Security implications + - Performance considerations + + Note: The PR branch is already checked out in the current working directory. + + Use `gh pr comment` for top-level feedback. + Use `mcp__github_inline_comment__create_inline_comment` (with `confirmed: true`) to highlight specific code issues. + Only post GitHub comments - don't submit review text as messages. + + claude_args: | + --allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Read,Grep,Glob"