-
Notifications
You must be signed in to change notification settings - Fork 59
40 lines (35 loc) · 1.67 KB
/
Copy pathcode-review.yaml
File metadata and controls
40 lines (35 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Code Review
on:
issue_comment:
types: [created]
permissions:
contents: read
pull-requests: write
id-token: write
jobs:
review:
if: github.event.issue.pull_request && contains(github.event.comment.body, '/review')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: refs/pull/${{ github.event.issue.number }}/head
fetch-depth: 0
- uses: anthropics/claude-code-action@v1
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.issue.number }}
You are reviewing this pull request. Follow these steps:
1. Run `gh pr view ${{ github.event.issue.number }} --json title,body,files` to understand the PR.
2. Run `gh pr diff ${{ github.event.issue.number }}` to see the full diff.
3. Read the key changed files to understand context.
4. Analyze for bugs, security issues, correctness problems, and code quality concerns.
5. Post your findings as inline review comments using the GitHub review tools available to you. If inline comments are not possible, post a consolidated review as a PR comment using `gh pr comment ${{ github.event.issue.number }} --body "..."`.
Focus on actionable feedback. Skip nitpicks and style issues already enforced by linters.
claude_args: "--max-turns 30 --model claude-sonnet-4-6 --allowedTools Bash,Read,Glob,Grep"
include_fix_links: true
classify_inline_comments: false
show_full_output: true