PR Review Comments
Fetch unresolved review threads from a GitHub pull request, filtered for context efficiency. Avoids flooding the context with resolved threads. Outdated threads are included but marked.
Usage
bun ${CLAUDE_PLUGIN_ROOT}/scripts/pr-comments.ts <pr-url> [--role author|reviewer] [--since last-review|<date>] [--bots]
Arguments
<pr-url>: GitHub PR URL (e.g.,https://github.com/owner/repo/pull/123)--role:authororreviewer(default: auto-detect based on authenticated user)--since: filter to threads with activity sincelast-reviewor an ISO date--bots: only review-bot threads (accounts the API types asBot), plus any logins in$CLAUDE_PLUGIN_DATA/reviewers.txt
Role
- author (default when authenticated user is the PR author): shows all unresolved threads, the feedback that needs addressing.
- reviewer (default when authenticated user is not the PR author): shows only unresolved threads started by the authenticated user, to check whether comments have been resolved.
Since
last-review: Scopes to threads with activity since the last relevant review.- As author: since the most recent review by a human other than you (bot reviews are excluded)
- As reviewer: since your most recent submitted review
- ISO date: explicit cutoff (e.g.,
2025-01-15)
Output
Compact markdown grouped by file with line numbers and full comment bodies, enough to act on the feedback directly without additional API calls. Each thread prints its node id, used to reply and resolve.
Replying and Resolving
Reply to and resolve threads through the addPullRequestReviewThreadReply and resolveReviewThread mutations, addressing a thread by the id from the fetch output.
# Reply, or reply and resolve in one call
bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts reply <thread-id> --body "..."
bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts reply <thread-id> --resolve --body "..."
# Resolve alone (prefer reply --resolve so the resolve carries context)
bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts resolve <thread-id>
Pass the reply text with --body, --bodyFile <path>, or stdin. Don't resolve without a reply: a silent resolve hides why the thread closed.