Skip to content

Commit acb8f0c

Browse files
authored
Tweak bot PR review prompts (#1465)
1 parent 431da26 commit acb8f0c

File tree

2 files changed

+47
-5
lines changed

2 files changed

+47
-5
lines changed

.cursor/BUGBOT.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# BugBot configuration
2+
3+
This file contains the configuration for the BugBot.
4+
5+
## PR description
6+
7+
- Don't list all the changes by files/change types, just very briefly summarize what is the PR trying to accomplish.
8+
- Don't list the changes files/dirs.
9+
- Don't use sections, or lists, ideally just one short paragraph.
10+
- Don't use emojis.
11+
12+
## PR review
13+
14+
Please review this pull request and provide feedback on:
15+
16+
- Potential bugs or issues
17+
- Performance considerations
18+
- Important security concerns
19+
20+
Be constructive and helpful in your feedback and be **very conscise**.
21+
Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style.
22+
Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues.
23+
Don't output final summaries, or final lists of action items.

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

Lines changed: 24 additions & 5 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]
66

77
jobs:
88
claude-review:
@@ -38,7 +38,26 @@ jobs:
3838
Be constructive and helpful in your feedback and be **very conscise**.
3939
Skip general recommendations, skip summarizing the changes, and don't make any recommendations on code style.
4040
Also skip any summarization about why the PR was done well, focus only on the code changes and the potential issues.
41-
42-
Use `gh pr comment` with your Bash tool to leave your review as a comment on the PR.
43-
44-
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:*)"'
41+
Don't output final summaries, or final lists of action items.
42+
Reduce false positives—try to validate if the issue is really a valid problem in the changes.
43+
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.event.pull_request.head.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)