github:pr-comments ยท diff
git:20261018.259fc9f to git:20261030.03f7155
12 added, 23 removed. Audit A to A.
---
name: github:pr-comments
description: Fetch, reply to, and resolve review threads on a GitHub pull request. Use when checking what review feedback needs addressing, whether threads are resolved, replying to review comments, or clearing AI-reviewer threads after acting on them.
argument-hint: "<pr-url> [--role author|reviewer] [--bots] [--include-resolved]"
allowed-tools:
["Bash(bun ${CLAUDE_PLUGIN_ROOT}/scripts/pr-comments.ts:*)", "Bash(bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts:*)"]
---
# PR Review Comments
- Fetch review threads from a GitHub pull request. Resolved threads are excluded by default. Outdated threads are included but marked.
-
- ## Usage
+ ## Fetching
```bash
bun ${CLAUDE_PLUGIN_ROOT}/scripts/pr-comments.ts <pr-url> [--role author|reviewer] [--since last-review|<date>] [--bots] [--include-resolved]
```
- - `--role`: `author` fetches all unresolved threads, the feedback that needs addressing. `reviewer` fetches only unresolved threads started by the authenticated user, to check whether comments have been resolved. Defaults by whether the authenticated user is the PR author.
- - `--since last-review`: threads with activity since the last relevant review. As author: the most recent review by a human other than you (bot reviews excluded). As reviewer: your most recent submitted review. An ISO date (e.g. `2025-01-15`) sets an explicit cutoff.
- - `--bots`: only review-bot threads: accounts the API types as `Bot` (Copilot, CodeRabbit, Greptile) plus the plugin's configured `reviewers`. Always pass `--reviewers=${user_config.reviewers}` with it. Use this filter to detect bots rather than hardcoding logins.
- - `--include-resolved`: include resolved threads, tagged `(resolved)`, for follow-up-style flows that must surface silently resolved threads.
+ Output is markdown grouped by file, with each thread's node `id` for replying and resolving. Resolved threads are excluded by default. Outdated threads are included and marked.
- Output is compact markdown grouped by file with line numbers and full comment bodies. Each thread prints its node `id`, used to reply and resolve.
+ - `--role`: `author` fetches all unresolved threads. `reviewer` fetches unresolved threads the authenticated user started. Defaults by whether the authenticated user is the PR author.
+ - `--since last-review`: threads with activity since the last relevant review. As author, that is the latest review by a human other than you. As reviewer, it is your latest submitted review. An ISO date (`2025-01-15`) sets an explicit cutoff.
+ - `--bots`: only review-bot threads, meaning accounts the API types as `Bot` plus the plugin's configured reviewers. Pass `--reviewers=${user_config.reviewers}` with it. Identify bots through this filter.
+ - `--include-resolved`: include resolved threads, tagged `(resolved)`, to find threads resolved without a reply.
## Replying and Resolving
```bash
- 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 "..."
+ bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts reply <thread-id> [--resolve] --body "..."
+ bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts react <thread-id> [--down] [--resolve]
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. Prefer `reply --resolve` so the resolve carries context. A reply that shows a screenshot uploads it first through the endpoint in `github:attach`. Review threads sit outside the reach of `gh`'s `--attach` flag.
-
- ## Reactions
-
- React with a thumbs up where you would otherwise write a low-value acknowledgment reply (test coverage, a rename, an obvious guard). Stay silent where you would have stayed silent.
-
- ```bash
- bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts react <thread-id> --resolve
- bun ${CLAUDE_PLUGIN_ROOT}/scripts/review-threads.ts react <thread-id> --down --resolve
- ```
+ `reply` also takes `--bodyFile <path>` or stdin. Upload a screenshot for a reply through the endpoint in `github:attach`, since `gh`'s `--attach` does not reach review threads.
- The reaction lands on the thread's first comment. Thumbs down (`--down`) is feedback to a bot reviewer whose comment was wrong or unhelpful. Never thumbs down a human, and never in an autonomous run.
+ Resolve each thread together with a reply or a reaction, through `reply --resolve` or `react --resolve`. The reply or reaction records why the thread closed. React with a thumbs up where an acknowledgment reply would add nothing (test coverage, a rename, an obvious guard). The reaction goes on the thread's first comment.
- ## Bot Reviewer Threads
+ `--down` is feedback to a bot reviewer whose comment was wrong or unhelpful. Use it only on bot threads and only in an attended run.
- On threads the `--bots` filter catches, don't converse with the bot. Push the fix and resolve the thread, or acknowledge with a thumbs up. If a reply is genuinely needed, state the resolution as a terse note for a future human reader ("Guarded with a null check"), not a message to the bot.
+ On bot threads, push the fix and resolve, or react with a thumbs up. When a reply is needed, write it as a terse note for a future human reader ("Guarded with a null check").