Skip to content

Commit bbdb24e

Browse files
committed
chore: Make claude review update a single comment
1 parent 1996e17 commit bbdb24e

File tree

3 files changed

+49
-11
lines changed

3 files changed

+49
-11
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ jobs:
2121
runs-on: ubuntu-latest
2222
permissions:
2323
contents: read
24-
pull-requests: read
25-
issues: read
24+
pull-requests: write
25+
issues: write
2626
id-token: write
2727

2828
steps:
@@ -36,6 +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
40+
additional_permissions: "actions:read"
3941
prompt: |
4042
REPO: ${{ github.repository }}
4143
PR NUMBER: ${{ github.event.pull_request.number }}
@@ -49,9 +51,7 @@ jobs:
4951
5052
Use the repository's CLAUDE.md for guidance on style and conventions. Be constructive and helpful in your feedback.
5153
52-
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
53-
5454
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
5555
# or https://docs.claude.com/en/docs/claude-code/cli-reference for available options
56-
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:*)"'
56+
claude_args: '--allowed-tools "Bash(gh issue view:*),Bash(gh search:*),Bash(gh issue list:*),Bash(gh pr diff:*),Bash(gh pr view:*),Bash(gh pr list:*)"'
5757

.github/workflows/claude.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,16 @@ jobs:
1919
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
2020
runs-on: ubuntu-latest
2121
permissions:
22-
contents: read
23-
pull-requests: read
24-
issues: read
22+
contents: write # Allow creating branches/commits
23+
pull-requests: write # Allow pushing to PR branches
24+
issues: write # Allow updating issue comments
2525
id-token: write
26-
actions: read # Required for Claude to read CI results on PRs
26+
actions: read # Required for Claude to read CI results on PRs
2727
steps:
2828
- name: Checkout repository
2929
uses: actions/checkout@v4
3030
with:
31-
fetch-depth: 1
31+
fetch-depth: 0 # Full history for git operations
3232

3333
- name: Run Claude Code
3434
id: claude

README.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,45 @@ Increment `versionCode` and `versionName` in `app/build.gradle.kts`, then run:
134134
APK is generated in `app/build/outputs/apk/_flavor_/release`. (`_flavor_` can be any of 'dev', 'mainnet', 'tnet').
135135
Example for dev: `app/build/outputs/apk/dev/release`
136136

137+
## Contributing
138+
139+
### AI Code Review with Claude
140+
141+
This repository has Claude Code integrated for on-demand AI assistance on issues and pull requests.
142+
143+
#### How to Use
144+
145+
Mention `@claude` in any PR comment, issue, or review to trigger Claude:
146+
147+
| Command | Description |
148+
|---------|-------------|
149+
| `@claude review` | Request a code review of the PR |
150+
| `@claude /review` | Same as above (slash command) |
151+
| `@claude review focus on security` | Review with specific focus |
152+
| `@claude explain this change` | Ask questions about the code |
153+
| `@claude fix the null pointer issue` | Request Claude to implement a fix |
154+
| `@claude /help` | Show available commands |
155+
156+
#### Notes
157+
158+
- Claude follows the project guidelines defined in `CLAUDE.md`
159+
- **Automatic reviews** run on every PR open and push (updates same comment)
160+
- **On-demand assistance** via `@claude` mentions in comments/issues
161+
- Claude can read CI results to provide context-aware feedback
162+
- For implementation requests, Claude will create commits on your branch
163+
164+
#### Example
165+
166+
```
167+
@claude review
168+
169+
Please focus on:
170+
- Kotlin idioms and best practices
171+
- Potential memory leaks
172+
- Thread safety in coroutines
173+
```
174+
137175
## License
138176

139-
This project is licensed under the MIT License.
177+
This project is licensed under the MIT License.
140178
See the [LICENSE](./LICENSE) file for more details.

0 commit comments

Comments
 (0)