Skip to content

Commit 1369ad8

Browse files
committed
Use sticky comment for Claude PR review instead of creating new comments
Enable `use_sticky_comment` to update the existing review comment in place on subsequent pushes, instead of creating a new comment each time. Also add `reopened` trigger for completeness.
1 parent f41b434 commit 1369ad8

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

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

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Claude Code Review
22

33
on:
44
pull_request:
5-
types: [opened, synchronize]
5+
types: [opened, synchronize, reopened]
66
# Optional: Only run on specific file changes
77
# paths:
88
# - "src/**/*.ts"
@@ -36,10 +36,8 @@ jobs:
3636
uses: anthropics/claude-code-action@v1
3737
with:
3838
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
39+
use_sticky_comment: "true"
3940
prompt: |
40-
REPO: ${{ github.repository }}
41-
PR NUMBER: ${{ github.event.pull_request.number }}
42-
4341
Please review this pull request and provide feedback on:
4442
- Code quality and best practices
4543
- Potential bugs or issues
@@ -49,9 +47,6 @@ jobs:
4947
5048
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
5149
52-
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53-
5450
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5551
# or https://code.claude.com/docs/en/cli-reference for available options
5652
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:*)"'
57-

0 commit comments

Comments
 (0)