|
8 | 8 |
|
9 | 9 | Follow these steps in order: |
10 | 10 |
|
11 | | -1. **Understand the review feedback** |
12 | | - Read all review comments and conversation comments on the PR carefully. \ |
13 | | -Understand what changes the reviewers are requesting. Check the current diff \ |
14 | | -to understand the state of the PR. |
| 11 | +1. **Understand and triage the review feedback** |
| 12 | + Read all review comment threads and conversation comments on the PR carefully. \ |
| 13 | +For each review thread, classify it as: |
| 14 | + - **Actionable** — the request is clear and you can address it directly. |
| 15 | + - **Needs clarification** — the request is ambiguous, contradictory, or you \ |
| 16 | +cannot determine what change is being asked for. Do not guess — ask for clarification. |
| 17 | + - **Won't address** — the request is out of scope for this iteration, or you \ |
| 18 | +disagree with the suggestion (explain why in your reply). |
15 | 19 |
|
16 | | -2. **Address the feedback** |
17 | | - Make focused changes to address the review feedback. Only change what the \ |
18 | | -reviewers requested — do not refactor unrelated code or add unrequested features. |
| 20 | +2. **Address the actionable feedback** |
| 21 | + Make focused changes to address the review feedback you classified as actionable. \ |
| 22 | +Only change what the reviewers requested — do not refactor unrelated code or add \ |
| 23 | +unrequested features. |
19 | 24 |
|
20 | 25 | 3. **Test your changes** |
21 | 26 | This step is MANDATORY — do NOT skip it. |
22 | 27 | - Run the project build: `mise run build` |
23 | 28 | - Run linters and type-checkers if available. |
24 | 29 | - If the project has tests, run them (e.g., `npm test`, `pytest`, `make test`). |
25 | | - - Report test and build results in your PR comment. |
26 | 30 |
|
27 | 31 | 4. **Commit and push to `{branch_name}`** |
28 | 32 | After each logical unit of work, commit and push: |
|
37 | 41 | Do NOT accumulate large uncommitted changes — pushing frequently is your \ |
38 | 42 | durability mechanism. |
39 | 43 |
|
40 | | -5. **Update the PR** |
41 | | - When done, add a summary comment to the existing PR. Do NOT create a new PR. |
| 44 | +5. **Reply to each review comment thread** |
| 45 | + For each review comment thread listed in the Review Comments section above, \ |
| 46 | +reply directly to that thread using the GitHub API: |
42 | 47 | ``` |
43 | | - gh pr comment {pr_number} --repo {repo_url} --body "<summary of changes made>" |
| 48 | + gh api repos/{repo_url}/pulls/{pr_number}/comments/<comment_id>/replies \\ |
| 49 | + -f body="<your reply>" |
44 | 50 | ``` |
45 | | - The comment must include: |
46 | | - - Summary of what was changed to address feedback |
47 | | - - Build and test results (what commands were run, output summary, pass/fail) |
48 | | - - Any decisions made or questions for reviewers\ |
| 51 | + Replace `<comment_id>` with the top-level comment ID shown next to each \ |
| 52 | +thread (e.g. `reply with comment_id: 12345678`). |
| 53 | +
|
| 54 | + Your reply MUST follow these guidelines: |
| 55 | + - **If you addressed the comment**: Briefly explain what you changed, the rationale, and in \ |
| 56 | +which commit. Example: "Fixed in abc1234 — added the null check as suggested." |
| 57 | + - **If you need clarification**: Explain what is unclear and ask a specific \ |
| 58 | +question. Example: "I'm not sure what validation you'd like here — should this \ |
| 59 | +reject empty strings, or only null/undefined values?" |
| 60 | + - **If you won't address it**: Explain why (out of scope, disagree, etc.). \ |
| 61 | +Example: "This is outside the scope of this PR — I'll open a separate issue for it." |
| 62 | + - Keep replies concise and factual. |
| 63 | +
|
| 64 | +6. **Post a summary comment on the PR** |
| 65 | + When done, add a top-level summary comment to the PR: |
| 66 | + ``` |
| 67 | + gh pr comment {pr_number} --repo {repo_url} --body "<summary>" |
| 68 | + ``` |
| 69 | + The summary must include: |
| 70 | + - What was changed to address feedback |
| 71 | + - Which comments were addressed (brief list) |
| 72 | + - Which comments need clarification from reviewers |
| 73 | + - Build and test results (what commands were run, pass/fail)\ |
49 | 74 | """ |
0 commit comments