Copilot Review Triage
Read Copilot's review comments on the current PR and triage each one with an actionable recommendation.
Steps
- •
Identify the PR by running:
- •
gh pr view --json number,title,headRefName,urlfrom the current branch - •If no PR is found, ask the user for a PR number
- •
- •
Fetch Copilot review comments by running:
- •
gh api repos/{owner}/{repo}/pulls/{number}/comments --jq '.[] | select(.user.login | test("copilot|github-actions|bot"; "i")) | {id, path, line, body, diff_hunk, created_at, in_reply_to_id}' - •Also check for PR review threads:
gh api repos/{owner}/{repo}/pulls/{number}/reviews --jq '.[] | select(.user.login | test("copilot|github-actions|bot"; "i")) | {id, body, state}' - •If no Copilot comments are found, tell the user and stop
- •
- •
For each comment, read the referenced file and surrounding code to understand context, then categorize it:
- •Fix — The comment identifies a real issue worth addressing
- •Dismiss — The comment is a false positive, not applicable, or the existing code is already correct
- •Decide — The comment raises a valid point but it's a judgment call (style preference, trade-off, scope question)
- •
Present the triage using the output format below.
Output Format
code
## PR #<number>: <title> <url> ### Summary - <N> comments total: <X> Fix, <Y> Dismiss, <Z> Decide --- ### Fix #### <path>:<line> > <quoted Copilot comment — brief> **Recommendation:** <what to change and why> **Suggested change:** <code block showing the fix> --- ### Decide #### <path>:<line> > <quoted Copilot comment — brief> **Trade-off:** <explain both sides> **If you agree:** <what to change> **If you disagree:** <dismissal response to paste> --- ### Dismiss #### <path>:<line> > <quoted Copilot comment — brief> **Why dismiss:** <short explanation> **Dismiss response:** > <ready-to-paste dismissal message for the PR comment>
Guidelines
- •Order sections: Fix first, then Decide, then Dismiss (most actionable first)
- •Within each section, group by file path
- •Keep dismiss responses professional and brief (1-2 sentences)
- •For fixes, show the actual code change — don't just describe it
- •For decisions, be genuinely neutral — present both sides fairly
- •If a Copilot comment is about something already handled elsewhere in the code, note that in the dismissal
- •If multiple comments relate to the same underlying issue, group them together
- •Read the actual source files before making recommendations — don't rely solely on the diff hunk