Skip to content

Commit 65dd0ac

Browse files
committed
feat(review): allow search tools and upload execution log
1 parent 3444621 commit 65dd0ac

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,26 @@ jobs:
147147
148148
${{ steps.prompt.outputs.content }}
149149
claude_args: |
150-
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read"
150+
--allowedTools "mcp__github_inline_comment__create_inline_comment,Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr review:*),Read,Grep,Glob"
151+
152+
# Grep/Glob above were added because 64% of runs (256/400 sampled) hit at least
153+
# one permission denial — 1,562 denials across 7,819 turns. Search is the only
154+
# tool class the prompt's "read affected files for context" step needs that the
155+
# allowlist withheld. This artifact is how we confirm that: the action writes
156+
# every tool_use with its full input here, and without the upload it dies with
157+
# the runner (the job log only records init + result, and the check-run summary
158+
# is empty under track_progress: false).
159+
# The review step is continue-on-error, so this runs even when it failed and
160+
# wrote nothing; an empty execution_file would make upload-artifact fail on a
161+
# missing `path`, hence the output guard rather than if-no-files-found alone.
162+
- name: Upload Claude execution log
163+
if: github.event.pull_request.user.login != 'dependabot[bot]' && steps.review.outputs.execution_file != ''
164+
uses: actions/upload-artifact@v7.0.1
165+
with:
166+
name: claude-execution-log-pr-${{ github.event.pull_request.number }}
167+
path: ${{ steps.review.outputs.execution_file }}
168+
if-no-files-found: ignore
169+
retention-days: 90
151170

152171
- name: Notify on review failure
153172
if: github.event.pull_request.user.login != 'dependabot[bot]' && (steps.review.outcome == 'failure' || steps.review.outcome == 'cancelled')

0 commit comments

Comments
 (0)