Skip to content

Commit 9b5101e

Browse files
authored
Merge branch 'master' into fix/viscous-3d-gpu-private
2 parents b63f36b + 7658b43 commit 9b5101e

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

.github/workflows/claude-code-review.yml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,35 @@ jobs:
1515
id-token: write
1616

1717
steps:
18+
# IMPORTANT: checkout BASE repo only (safe on forks)
1819
- name: Checkout base repo (safe)
1920
uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 1
22-
23-
- name: Ensure ~/.local/bin exists and is on PATH
24-
run: |
25-
mkdir -p "$HOME/.local/bin"
26-
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
27-
23+
2824
- name: Run Claude Code Review
2925
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 }}
3029
with:
3130
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
3231
github_token: ${{ github.token }}
3332

3433
plugin_marketplaces: "https://github.com/anthropics/claude-code.git"
3534
plugins: "code-review@claude-code-plugins"
3635

37-
show_full_output: true
38-
3936
claude_args: >
4037
--dangerously-skip-permissions
41-
--max-turns 60
38+
--max-turns 80
4239
--allowedTools
43-
"Bash(gh:*)"
40+
"Bash(gh pr view:*)"
41+
"Bash(gh pr diff:*)"
42+
"Bash(gh pr comment:*)"
43+
"Bash(gh api:*)"
4444
"Bash(cat:*)"
4545
"Bash(ls:*)"
46+
"Bash(find:*)"
4647
"Bash(grep:*)"
4748
"Bash(sed:*)"
4849
"Bash(awk:*)"
@@ -57,31 +58,30 @@ jobs:
5758
"Bash(python3:*)"
5859
5960
prompt: |
60-
You are running in pull_request_target. DO NOT execute or inspect PR fork code.
61-
Review ONLY via GitHub API/gh commands.
61+
You are running in pull_request_target.
62+
DO NOT read or inspect any checked-out PR/fork code. Review ONLY using GitHub API/gh commands.
6263
63-
Read local guidance ONLY from:
64-
- CLAUDE.md (root) if present
65-
- .claude/rules/*.md if present
66-
Do NOT read any other workspace files.
64+
You may read local guidance ONLY from:
65+
- ./CLAUDE.md (root) if present
66+
- ./.claude/rules/*.md if present (max 10 files)
6767
68-
Keep tool calls minimal:
69-
1) ls .claude/rules || true
70-
2) If CLAUDE.md exists: cat CLAUDE.md
71-
3) If .claude/rules exists: cat each .md file directly (no loops; at most 10 files)
68+
Keep tool calls minimal and in this order:
69+
1) ls -1 .claude/rules 2>/dev/null || true
70+
2) cat CLAUDE.md 2>/dev/null || true
71+
3) find .claude/rules -maxdepth 1 -name "*.md" -print | head -n 10 | xargs -I{} cat "{}" 2>/dev/null || true
7272
4) gh pr view ${{ github.event.pull_request.number }} --repo ${{ github.repository }} --json title,body,files,changedFiles,additions,deletions,headRefOid
7373
5) gh pr diff ${{ github.event.pull_request.number }} --repo ${{ github.repository }}
74-
6) Post ONE top-level comment.
74+
6) Post ONE top-level PR comment, then STOP.
7575
7676
Output format:
7777
- Head SHA
7878
- Files changed count + list up to 10 file paths
79-
- Summary (3–6 bullets)
79+
- Summary (3–6 bullets, minimal)
8080
- Findings with file + line numbers when possible
8181
- If no issues: 0–3 improvement opportunities (only if confident)
8282
8383
Post ONE top-level PR comment titled "Claude Code Review".
84-
Then stop.
84+
If posting is blocked, write the full review to the GitHub Actions job summary instead, then STOP.
8585
8686
additional_permissions: |
8787
actions: read

0 commit comments

Comments
 (0)