Handle PR feedback — triage all comments, fix what needs fixing, defend what is correct. Invoked when a review arrives on an open PR.
The review came back. Read the whole thing before touching anything.
Argument: $ARGUMENTS — PR number.
gh pr view $0 --json reviews,comments
gh api repos/{owner}/{repo}/pulls/$0/comments --jq '.[] | {id, path, line, body, user: .user.login}'
Read the summary. Read every inline comment. Understand the full picture before responding to any single comment.
| Classification | Condition | Action |
|---|---|---|
| Fix | The comment is right. Code needs to change. | Address below |
| Resolve | The code is correct. You can explain why. | Resolve below |
| Question | Reviewer asking for clarification. | Reply with the answer |
| Acknowledged | Informational, no action needed. | Reply briefly |
If multiple comments need code changes, plan them together — fixes interact.
Tip: treat all reviewers the same. Wintermute, Dixie, zoobzio — the comment is either right or it is not.
The comment identified a real issue. Fix it.
go build ./..., go test -race ./..., go vet ./..., golangci-lint run ./...git add <files> && git commit -m "$(cat <<'EOF'