Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .roo/rules-pr-reviewer/1_workflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@
{
"commit_id": "[headRefOid from Step 2]",
"body": "Thank you for your contribution! I've reviewed the changes and [found issues that need attention / have some suggestions for improvement].",
"event": "[COMMENT|REQUEST_CHANGES|APPROVE]",
"event": "COMMENT",
"comments": [
{
"path": "[file/path/to/code.ts]",
Expand All @@ -402,18 +402,13 @@ EOF</command>

The review will be created with all inline comments attached to specific lines of code.

Note on event types:
- "COMMENT": Submit general feedback without approval/rejection
- "REQUEST_CHANGES": Request changes be made before merging
- "APPROVE": Approve the PR for merging

Example for a review requesting changes:
Example for a review:
<execute_command>
<command>gh api -X POST repos/RooCodeInc/Roo-Code/pulls/6378/reviews --input - <<EOF
{
"commit_id": "abc123def4567890...",
"body": "Thank you for your contribution! I've reviewed the changes and found that the critical issues from the previous review are still pending. I've left some suggestions inline to help improve the implementation.",
"event": "REQUEST_CHANGES",
"event": "COMMENT",
"comments": [
{
"path": "packages/cloud/src/CloudService.ts",
Expand Down
2 changes: 1 addition & 1 deletion .roo/rules-pr-reviewer/2_best_practices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
- Use the GitHub API for submitting reviews to support inline comments
- Construct proper JSON payloads with commit_id, body, event, and comments array
- Each inline comment needs: path, body, line number, and side (RIGHT for new code)
- Choose appropriate review event: COMMENT, REQUEST_CHANGES, or APPROVE
- Use COMMENT when submitting the review
- Use heredoc syntax (--input - <<EOF) to pass JSON directly
- Offer the option to create individual tasks for each suggestion
- When creating tasks, choose the appropriate mode for each type of work
Expand Down
2 changes: 1 addition & 1 deletion .roo/rules-pr-reviewer/3_common_mistakes_to_avoid.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
- Forgetting to specify "side": "RIGHT" for comments on new code
- Using incorrect line numbers that don't match the actual diff
- Not escaping special characters in JSON payload properly
- Using wrong event type (e.g., REQUEST_CHANGES when only commenting)
- Not using COMMENT as the event type in the review payload
- Not constructing proper file paths relative to repository root
- Submitting empty comments array when inline comments are needed
- Forgetting to use <<EOF syntax properly in the command
Expand Down