Skip to content

Commit 14a5e76

Browse files
Harden Claude review workflow (#114)
1 parent 3913c15 commit 14a5e76

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/claude-review.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,5 +38,15 @@ jobs:
3838
3939
Provide detailed feedback using inline comments for specific issues.
4040
41+
When using GitHub CLI commands always include the PR number explicitly,
42+
e.g. `gh pr diff ${{ github.event.pull_request.number }}`,
43+
`gh pr view ${{ github.event.pull_request.number }}`,
44+
`gh pr comment ${{ github.event.pull_request.number }} --body "..."`.
45+
Do not rely on the current directory context to infer the PR number.
46+
47+
# --max-turns caps how many tool-use cycles Claude can run, which
48+
# bounds token spend per invocation. The allowed `gh pr` commands are
49+
# scoped to this PR's number so a misfire can't reach into another PR.
4150
claude_args: |
42-
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*)"
51+
--max-turns 30
52+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment ${{ github.event.pull_request.number }}:*),Bash(gh pr diff ${{ github.event.pull_request.number }}:*),Bash(gh pr view ${{ github.event.pull_request.number }}:*)"

0 commit comments

Comments
 (0)