Skip to content

Commit c04d7f9

Browse files
fix: enable Claude code review bot to approve clean PRs (#370)
* fix: enable Claude code review bot to approve clean PRs Add Step 6 to the review workflow prompt instructing Claude to approve PRs when no issues are found. Also add `gh pr review` to the allowed tools list so the bot can actually run the approval command. Tested on ninja-shreyash/cherrypick-test#22 — bot successfully approved a clean PR with state APPROVED. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: post approval message --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent bfa8eca commit c04d7f9

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,13 @@ jobs:
137137
this run, and (b) any threads you unresolved this run. Do not list
138138
issues you skipped via the dedupe gate.
139139
140+
STEP 6 — Post approval message or stay silent.
141+
After the review completes:
142+
• If you posted NO new inline comments and unresolved NO threads
143+
(i.e., the PR is clean) → post an approval comment using:
144+
gh pr comment ${{ github.event.pull_request.number }} --body "✅ No issues found. Checked for bugs and CLAUDE.md compliance."
145+
• If you DID post inline comments or unresolve threads → do NOT post an approval comment.
146+
140147
Now run the plugin:
141148
/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }} --comment
142149
use_sticky_comment: true

0 commit comments

Comments
 (0)