Publish PR Review
Publish the verdict and findings of a completed review from this conversation, or carry out its authorized closure recommendation. Use its evidence when composing the public copy; do not conduct another review or add findings.
Do not publish when
Stop on any of these, say which one, and ask for what would clear it.
- The user has not explicitly authorized the requested action. Publishing a review does not authorize closing the pull request. Neither action authorizes code changes, labels, reviewer requests, or merges.
- The head has moved past the revision that was reviewed. Checking the findings against the new commits is reviewing rather than publishing, so hand it back instead of doing it here, even when they look like they survive. Publishing against unreviewed code is worse than publishing late.
- You are publishing a review and every finding is already on the pull request. Read the existing reviews, threads, and PR comments first, including other people's and ones predating the reviewed revision. Drop the findings those threads already cover, say which you dropped, and stop only when nothing is left to add. This condition covers duplication alone; a moved head is condition 2 and outranks it.
- The exact review body, inline comments and locations, or closing comment have not been shown and confirmed. Show the copy itself as a separate step before any mutation; a summary or file path is not a substitute.
- The review depends on an unresolved decision from the maintainer. Return it to triage; do not resolve the review's direction while publishing.
Public copy
Write to the pull request author as a colleague discussing the change. Use the completed review and the PR conversation to decide what needs saying.
- Reuse wording the user already approved verbatim, adjusting only local paths and links for the pull request UI and labels under the policy below.
- On our first review or comment, including when requesting changes, thank the contributor by first name (profile or commits), falling back to
@loginonly when there is none. - On follow-ups, acknowledge the revisions and continue the discussion. Keep appreciation brief, proportionate, and specific when the evidence supports it.
- Use the body to explain what is ready or what still needs attention. A short paragraph usually suffices; leave detailed evidence in the inline comments and let the GitHub event carry the formal verdict.
- Preserve each finding's impact, evidence, and certainty. Explain the condition that causes the problem, its effect, and the needed outcome in the order that makes the concern easiest to follow.
- Omit formal priority or severity labels such as
[P1]unless explicitly requested or already used in that PR. - Make requests courteous and concrete: explain the result needed and give the author room to choose a fix. Keep blockers distinct from optional suggestions.
- Omit command logs, test ledgers, tool names, local paths, and review-process narration.
Before showing the assembled body and comments for confirmation, pass them through review-prose when available. It owns factual fidelity, wording, and active house style; this skill owns review-specific communication and placement. Check that the body and inline comments work together without repeating the same explanation.
Place the findings
- Anchor each actionable finding to the changed line it concerns.
- Keep one concern per inline thread.
- When no changed line can honestly anchor a finding, put it in the body with its file and line rather than anchoring it to an adjacent line.
Submit
- For review publication, send one review carrying the verdict and every inline finding:
APPROVEwhen ready,REQUEST_CHANGESwhen a finding blocks,COMMENTotherwise. For closure, post one comment explaining the reasons and close the pull request; inline findings invite fixes that will not be merged. - Verify the published review or closed state, head commit, comment bodies, and any inline locations.
- Report a direct link, and nothing else.
GitHub review API
gh pr review sends a body only and cannot attach inline comments. One request per finding fans the review out into unrelated threads. Send the whole review at once:
gh api --method POST repos/{owner}/{repo}/pulls/NUMBER/reviews --input - <<'JSON'
{
"commit_id": "PINNED_HEAD_SHA",
"event": "REQUEST_CHANGES",
"body": "CONFIRMED_REVIEW_BODY",
"comments": [
{ "path": "src/parse.js", "line": 42, "side": "RIGHT", "body": "CONFIRMED_FINDING_1" },
{ "path": "src/parse.js", "start_line": 55, "start_side": "RIGHT", "line": 58, "side": "RIGHT", "body": "CONFIRMED_FINDING_2" }
]
}
JSON- Set
event. Omitting it leaves the reviewPENDINGand unpublished. - Set
commit_idto the reviewed head. It otherwise defaults to the newest commit, publishing the review against code nobody reviewed. - Anchor with
lineandside; addstart_lineandstart_sidefor a range. UseRIGHTunless the finding is about a line the pull request deletes. positionis deprecated. Do not use it.- Every anchor must sit inside a diff hunk, both ends of a range included. An anchor outside a hunk fails the whole request with
422 pull_request_review_thread.line must be part of the diff, taking the verdict and every other finding with it. - Collect the commentable lines from the per-file
patchinrepos/{owner}/{repo}/pulls/NUMBER/filesbefore sending. - Verify anchors through
repos/{owner}/{repo}/pulls/NUMBER/comments; the review's own comments endpoint can omitlineandside.