gh-pr-review threads workflow
Scope
- Use the gh-pr-review extension (not core gh) for review threads and replies.
- Apply when a user wants to read review threads, respond, and resolve them.
Preconditions
- Ensure gh-pr-review is installed and available as
gh pr-review, if not installed, usegh extension install agynio/gh-pr-reviewinstall extension. - Work from the repo root or pass
--repo owner/repoand--pr <number>.
Procedure
- Confirm commands
- Run
gh pr-review --helpif unsure about subcommands or flags. - Use the dashed command:
gh pr-review, notgh pr-reviewwithout the dash.
- Fetch review threads
- Run:
gh pr-review review view --repo <owner/repo> <pr-number>to fetch review + comments.gh pr-review review view --repo <owner/repo> <pr-number> --unresolvedto fetch unresolved review + comments.gh pr-review threads list --repo <owner/repo> --pr <pr-number>to list thread IDs.
- Record
threadId,path, andlinefor each thread.
- Reply to each thread
- Compose a concise, direct reply describing the fix or rationale.
- Use:
gh pr-review comments reply --repo <owner/repo> --pr <pr-number> --thread-id <threadId> --body "<reply>"
- Resolve threads after reply
- Use:
gh pr-review threads resolve --repo <owner/repo> --pr <pr-number> --thread-id <threadId>
- Verify all threads resolved
- Re-run:
gh pr-review threads list --repo <owner/repo> --pr <pr-number>
- Confirm all threads show
isResolved: true.
Error handling
- If
command not found: instruct to install gh-pr-review. - If
accepts at most 1 arg(s): check command format; ensure--repoand--prare flags. - If permission errors occur: report inability to reply/resolve and ask the user to handle manually.
Output expectations
- Summarize actions taken: threads replied to, resolved, and any remaining open threads.
- Provide exact commands used if the user needs auditability.
Converted and distributed by TomeVault — claim your Tome and manage your conversions.