|
1 | | -name: Claude Code Review |
2 | | - |
3 | | -on: |
4 | | - pull_request_target: |
5 | | - types: [opened, synchronize, ready_for_review, reopened] |
6 | | - |
7 | | -jobs: |
8 | | - claude-review: |
9 | | - runs-on: ubuntu-latest |
10 | | - permissions: |
11 | | - contents: read |
12 | | - pull-requests: write |
13 | | - issues: read |
14 | | - actions: read |
15 | | - id-token: write |
16 | | - |
17 | | - steps: |
18 | | - - name: Checkout PR head (fork) |
19 | | - uses: actions/checkout@v4 |
20 | | - with: |
21 | | - ref: ${{ github.event.pull_request.head.sha }} |
22 | | - fetch-depth: 1 |
23 | | - |
24 | 1 | - name: Run Claude Code Review |
25 | 2 | id: claude-review |
26 | 3 | uses: anthropics/claude-code-action@v1 |
|
32 | 9 | plugins: 'code-review@claude-code-plugins' |
33 | 10 |
|
34 | 11 | claude_args: > |
35 | | - --dangerouslyDisableSandbox |
| 12 | + --dangerously-skip-permissions |
36 | 13 | --max-turns 10 |
37 | 14 | --allowedTools |
38 | 15 | "Bash(gh pr view:*)" |
|
59 | 36 | - Then: findings: |
60 | 37 | - If issues: list them with file path + line numbers when possible |
61 | 38 | - If no issues: list at least 3 concrete "improvement opportunities" with file paths |
62 | | -
|
63 | 39 | Post the results as ONE top-level PR comment titled "Claude Code Review". |
64 | | - If you cannot access the diff/files, say exactly what is blocked. |
65 | | - If posting a PR comment is blocked, write the full review to the GitHub Actions job summary instead. |
66 | | -
|
67 | | - IMPORTANT: |
68 | | - - Do NOT stop just because a previous "Claude Code Review" comment exists. |
69 | | - - If a prior Claude review exists, post a NEW comment titled "Claude Code Review (updated)" that includes: |
70 | | - - current head SHA: ${{ github.event.pull_request.head.sha }} |
71 | | - - files changed count + up to 15 file paths |
72 | | - - 3–6 bullet summary of changes |
73 | | - - findings or at least 3 improvement opportunities with file paths |
74 | | - Post as ONE top-level PR comment. |
75 | | -
|
76 | | - additional_permissions: | |
77 | | - actions: read |
0 commit comments