gh-pr-comments-all

Installation
SKILL.md

Fetch All PR Comments

A GitHub PR's "comments" live in three separate REST endpoints. Querying only /pulls/{n}/comments (the obvious one) silently drops top-level review bodies and PR-page discussion comments. This skill fetches all three, merges them, and prints a chronological view grouped by source.

This skill intentionally does NOT call the GraphQL reviewThreads endpoint — isResolved and isOutdated thread state is out of scope. If the user specifically needs to close already-replied Greptile bot threads, use resolve-greptile-comments. For raw thread-state on arbitrary reviewers, query the GraphQL endpoint directly, e.g.:

gh api graphql -f query='{repository(owner:"OWNER",name:"REPO"){pullRequest(number:N){reviewThreads(first:100){nodes{isResolved isOutdated comments(first:1){nodes{author{login} path}}}}}}}'

The three endpoints

Endpoint Returns UI origin
GET /repos/{o}/{r}/pulls/{n}/comments Inline file/line review comments (root comments and replies in one flat list, distinguished by in_reply_to_id) "Review changes → Comment on line"
GET /repos/{o}/{r}/pulls/{n}/reviews Top-level review summaries (the body in the "Finish your review" dialog, plus state like APPROVED / CHANGES_REQUESTED / COMMENTED / DISMISSED / PENDING) "Review changes → Summary box"
GET /repos/{o}/{r}/issues/{n}/comments PR-page discussion comments (everything on the Conversation tab not tied to a review) The bottom comment box on the PR page

All three need --paginate because GitHub's default page size is 30.

Installs
1
GitHub Stars
2
First Seen
Jul 3, 2026