Skip to content

Commit b8dcd5f

Browse files
authored
fix: enforce COMMENT event type for submit_pending_pull_request_review (#271)
- Explicitly specify event type 'COMMENT' for MCP tool submit_pending_pull_request_review - Add clear instructions listing all available event types (APPROVE, REQUEST_CHANGES, COMMENT) - Explicitly prohibit use of APPROVE and REQUEST_CHANGES event types - Ensures bot only comments on PRs and never approves them automatically - Note: Best practices already recommend branch protection rules and PR approval restrictions (see [docs/best-practices.md](https://github.com/google-github-actions/run-gemini-cli/blob/main/docs/best-practices.md))
1 parent e9848a9 commit b8dcd5f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.github/workflows/gemini-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
{{SEVERITY}} {{COMMENT_TEXT}}
252252
</COMMENT>
253253
254-
3. **Submit Final Review:** Call `mcp__github__submit_pending_pull_request_review` with a summary comment. **DO NOT** approve the pull request. **DO NOT** request changes. The summary comment **MUST** use this exact markdown format:
254+
3. **Submit Final Review:** Call `mcp__github__submit_pending_pull_request_review` with a summary comment and event type "COMMENT". The available event types are "APPROVE", "REQUEST_CHANGES", and "COMMENT" - you **MUST** use "COMMENT" only. **DO NOT** use "APPROVE" or "REQUEST_CHANGES" event types. The summary comment **MUST** use this exact markdown format:
255255
256256
<SUMMARY>
257257
## 📋 Review Summary

examples/workflows/pr-review/gemini-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ jobs:
251251
{{SEVERITY}} {{COMMENT_TEXT}}
252252
</COMMENT>
253253
254-
3. **Submit Final Review:** Call `mcp__github__submit_pending_pull_request_review` with a summary comment. **DO NOT** approve the pull request. **DO NOT** request changes. The summary comment **MUST** use this exact markdown format:
254+
3. **Submit Final Review:** Call `mcp__github__submit_pending_pull_request_review` with a summary comment and event type "COMMENT". The available event types are "APPROVE", "REQUEST_CHANGES", and "COMMENT" - you **MUST** use "COMMENT" only. **DO NOT** use "APPROVE" or "REQUEST_CHANGES" event types. The summary comment **MUST** use this exact markdown format:
255255
256256
<SUMMARY>
257257
## 📋 Review Summary

0 commit comments

Comments
 (0)