-
-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (39 loc) · 1.61 KB
/
Copy pathcode-review.yml
File metadata and controls
48 lines (39 loc) · 1.61 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
41
42
43
44
45
46
47
48
name: Code Review
on:
pull_request:
types: [opened]
jobs:
review:
if: |
github.event.pull_request.draft == false &&
github.event.pull_request.user.login != 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Run Claude Code Review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
model: claude-sonnet-5
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Review this pull request for code quality, correctness, and security.
Follow the project conventions in CLAUDE.md.
Focus on: bugs, race conditions in async code, WebSocket contract drift,
error-handling patterns (specific exceptions + exc_info=True), and
adherence to the JobState machine.
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 flag specific lines of code.
Only post GitHub comments — do not 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:*)"