-
Notifications
You must be signed in to change notification settings - Fork 4
50 lines (44 loc) · 2.28 KB
/
Copy pathclaude-code-review.yml
File metadata and controls
50 lines (44 loc) · 2.28 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
49
50
name: Claude Code Review
on:
pull_request:
types: [opened, synchronize, ready_for_review, reopened]
jobs:
claude-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
issues: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Run Claude Code Review
id: claude-review
uses: anthropics/claude-code-action@v1
with:
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
track_progress: true
prompt: |
REPO: ${{ github.repository }}
PR NUMBER: ${{ github.event.pull_request.number }}
Review this pull request with a focus on:
- Correctness bugs and edge cases
- Code quality and adherence to this repo's CLAUDE.md conventions
- Security implications
- Performance considerations
Provide detailed feedback using inline comments for specific issues.
# Interactive-session tools (ScheduleWakeup/SendMessage/Monitor, background
# Agent/Task execution) assume a persistent host that re-invokes the session
# later. This action runs the SDK once per job and exits when the turn ends,
# so the run silently reports success with no review ever posted. Upstream:
# anthropics/claude-code-action#1462, #1499.
claude_args: |
--model claude-opus-4-8
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
--disallowedTools "ScheduleWakeup,SendMessage,Monitor"
--append-system-prompt "This session runs once inside a GitHub Actions job and cannot be resumed or notified later. Never call Agent or Task without run_in_background: false. Do not end your turn assuming a background subagent or scheduled wakeup will continue the work -- it will not. Wait for every subagent synchronously and only finish once the actual deliverable (the PR review) has been produced."
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
# or https://code.claude.com/docs/en/cli-reference for available options