|
26 | 26 | </step> |
27 | 27 |
|
28 | 28 | <step number="2"> |
| 29 | + <name>Fetch Associated Issue (If Any)</name> |
| 30 | + <instructions> |
| 31 | + Check the pull request body for a reference to a GitHub issue (e.g., "Fixes #123", "Closes #456"). |
| 32 | + If an issue is referenced, use the GitHub MCP tool to fetch its details: |
| 33 | + |
| 34 | + <use_mcp_tool> |
| 35 | + <server_name>github</server_name> |
| 36 | + <tool_name>get_issue</tool_name> |
| 37 | + <arguments> |
| 38 | + { |
| 39 | + "owner": "[owner]", |
| 40 | + "repo": "[repo]", |
| 41 | + "issue_number": [issue_number] |
| 42 | + } |
| 43 | + </arguments> |
| 44 | + </use_mcp_tool> |
| 45 | + |
| 46 | + The issue description and comments can provide valuable context for the review. |
| 47 | + </instructions> |
| 48 | + </step> |
| 49 | + |
| 50 | + <step number="3"> |
29 | 51 | <name>Fetch Pull Request Diff</name> |
30 | 52 | <instructions> |
31 | 53 | Get the pull request diff to understand the changes: |
|
44 | 66 | </instructions> |
45 | 67 | </step> |
46 | 68 |
|
47 | | - <step number="3"> |
| 69 | + <step number="4"> |
48 | 70 | <name>Check Out Pull Request Locally</name> |
49 | 71 | <instructions> |
50 | 72 | Use the GitHub CLI (e.g. `gh pr checkout <PR_NUMBER>`) to check out the pull request locally after fetching |
|
61 | 83 | </instructions> |
62 | 84 | </step> |
63 | 85 |
|
64 | | - <step number="4"> |
| 86 | + <step number="5"> |
65 | 87 | <name>Fetch Existing PR Comments</name> |
66 | 88 | <instructions> |
67 | 89 | Get existing comments to understand the current discussion state: |
|
82 | 104 | </instructions> |
83 | 105 | </step> |
84 | 106 |
|
85 | | - <step number="5"> |
| 107 | + <step number="6"> |
86 | 108 | <name>Perform Comprehensive Review</name> |
87 | 109 | <instructions> |
88 | 110 | Review the pull request thoroughly: |
| 111 | + - Verify that the changes are directly related to the linked issue and do not include unrelated modifications. |
89 | 112 | - Focus primarily on the changes made in the PR. |
90 | 113 | - Prioritize code quality, code smell, structural consistency, and for UI-related changes, ensure proper internationalization (i18n) is applied. |
91 | 114 | - Watch for signs of technical debt (e.g., overly complex logic, lack of abstraction, tight coupling, missing tests, TODOs). |
|
106 | 129 | </instructions> |
107 | 130 | </step> |
108 | 131 |
|
109 | | - <step number="6"> |
| 132 | + <step number="7"> |
110 | 133 | <name>Prepare Review Comments</name> |
111 | 134 | <instructions> |
112 | 135 | Format your review comments following these guidelines: |
|
128 | 151 | </instructions> |
129 | 152 | </step> |
130 | 153 |
|
131 | | - <step number="7"> |
| 154 | + <step number="8"> |
132 | 155 | <name>Preview Review with User</name> |
133 | 156 | <instructions> |
134 | 157 | Always show the user a preview of your review suggestions and comments before taking any action. |
|
154 | 177 | </instructions> |
155 | 178 | </step> |
156 | 179 |
|
157 | | - <step number="8"> |
| 180 | + <step number="9"> |
158 | 181 | <name>Submit Review</name> |
159 | 182 | <instructions> |
160 | 183 | Based on user preference, submit the review: |
|
0 commit comments