1515 id-token : write
1616
1717 steps :
18+ - name : Install unzip (required by bun setup)
19+ run : |
20+ sudo apt-get update
21+ sudo apt-get install -y unzip
22+
1823 # IMPORTANT: checkout BASE repo only (safe on forks)
1924 - name : Checkout base repo (safe)
2025 uses : actions/checkout@v4
@@ -23,39 +28,20 @@ jobs:
2328
2429 - name : Run Claude Code Review
2530 uses : anthropics/claude-code-action@v1
26- env :
27- # Ensure the action can execute the Claude CLI it installs.
28- PATH : /home/runner/.local/bin:${{ env.PATH }}
2931 with :
3032 claude_code_oauth_token : ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3133 github_token : ${{ github.token }}
3234
3335 plugin_marketplaces : " https://github.com/anthropics/claude-code.git"
3436 plugins : " code-review@claude-code-plugins"
3537
38+ # NOTE: do NOT use --dangerouslyDisableSandbox (it can crash the CLI).
39+ # This flag is for non-interactive CI runs (bypasses approval prompts).
3640 claude_args : >
3741 --dangerously-skip-permissions
38- --max-turns 80
42+ --max-turns 10
3943 --allowedTools
40- "Bash(gh pr view:*)"
41- "Bash(gh pr diff:*)"
42- "Bash(gh pr comment:*)"
43- "Bash(gh api:*)"
44- "Bash(cat:*)"
45- "Bash(ls:*)"
46- "Bash(find:*)"
47- "Bash(grep:*)"
48- "Bash(sed:*)"
49- "Bash(awk:*)"
50- "Bash(head:*)"
51- "Bash(tail:*)"
52- "Bash(wc:*)"
53- "Bash(sort:*)"
54- "Bash(uniq:*)"
55- "Bash(cut:*)"
56- "Bash(xargs:*)"
57- "Bash(jq:*)"
58- "Bash(python3:*)"
44+ "Bash"
5945
6046 prompt : |
6147 You are running in pull_request_target.
7157 3) find .claude/rules -maxdepth 1 -name "*.md" -print | head -n 10 | xargs -I{} cat "{}" 2>/dev/null || true
7258 4) gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json title,body,files,changedFiles,additions,deletions,headRefOid
7359 5) gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
74- 6) Post ONE top-level PR comment, then STOP.
60+ 6) Post ONE top-level PR comment titled "Claude Code Review" , then STOP.
7561
7662 Output format:
7763 - Head SHA
8066 - Findings with file + line numbers when possible
8167 - If no issues: 0–3 improvement opportunities (only if confident)
8268
83- Post ONE top-level PR comment titled "Claude Code Review".
8469 If posting is blocked, write the full review to the GitHub Actions job summary instead, then STOP.
8570
8671 additional_permissions : |
0 commit comments