Skip to content

Commit 7fc3796

Browse files
committed
Try claude line comments
1 parent 0915e0a commit 7fc3796

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

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

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,23 @@ jobs:
4141
Don't output final summaries, or final lists of action items.
4242
Try not to use emojis.
4343
44-
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
45-
46-
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
44+
When you find a *specific issue* in the code (bug, performance concern, security risk, etc.),
45+
leave an **inline comment** on that exact file and line.
46+
If no issues are found, do not post anything.
47+
48+
To comment inline, use this format exactly:
49+
50+
```bash
51+
gh api \
52+
--method POST \
53+
-H "Accept: application/vnd.github+json" \
54+
-H "X-GitHub-Api-Version: 2022-11-28" \
55+
/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/comments \
56+
-f body='${BODY}' \
57+
-f commit_id="$GITHUB_SHA" \
58+
-f path='${PATH}' \
59+
-F line=${LINE} \
60+
-f side='RIGHT'
61+
```
62+
63+
claude_args: '--allowed-tools "Bash(gh api:*), Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr comment:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'

0 commit comments

Comments
 (0)