Просмотр исходного кода

Remove event types mention from PR reviewer rules (#6428)

Daniel 5 месяцев назад
Родитель
Сommit
0b9010a688

+ 3 - 8
.roo/rules-pr-reviewer/1_workflow.xml

@@ -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]",
@@ -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",

+ 1 - 1
.roo/rules-pr-reviewer/2_best_practices.xml

@@ -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

+ 1 - 1
.roo/rules-pr-reviewer/3_common_mistakes_to_avoid.xml

@@ -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