Skills pr-threads-resolve
Bulk resolve unresolved PR review threads. Useful after manually addressing threads or after using /pr-threads-address.
git clone https://github.com/posit-dev/skills
T=$(mktemp -d) && git clone --depth=1 https://github.com/posit-dev/skills "$T" && mkdir -p ~/.claude/skills && cp -r "$T/github/pr-threads-resolve" ~/.claude/skills/posit-dev-skills-pr-threads-resolve && rm -rf "$T"
github/pr-threads-resolve/SKILL.md/pr-threads-resolve
Usage:
/pr-threads-resolve [PR_NUMBER]
Description: Bulk resolve unresolved PR review threads. Useful after manually addressing threads or after using
/pr-threads-address.
Note: If
PR_NUMBER is omitted, the command will automatically detect and use the PR associated with the current branch.
Workflow
- Fetch and display all unresolved PR review threads
- Show thread details (file, line, comment text)
- Ask for confirmation or allow selective resolution
- Resolve the confirmed threads
- Report back with a summary of resolved threads
When to use
Use this command when you have already addressed PR review threads and want to bulk resolve them, or when you need to clean up threads that are no longer relevant.
Example
/pr-threads-resolve 42
This will:
- List all unresolved threads on PR #42
- Show what each thread is about
- Ask which threads to resolve (all or specific ones)
- Resolve the selected threads
- Provide a summary of resolved items
Prerequisites
Before using this command, check if the gh pr-review extension is installed:
gh extension list | grep -q pr-review || gh extension install agynio/gh-pr-review
CLI Reference
List Review Threads
Enumerate all review threads with filtering:
gh pr-review threads list --pr <number> --repo <owner/repo>
Common filters:
— Show only unresolved threads--unresolved
— Show only resolved threads--resolved
View PR Reviews and Comments
Display reviews, inline comments, and replies with full context:
gh pr-review review view --pr <number> --repo <owner/repo>
Common filters:
— Filter by specific reviewer--reviewer <login>
— Filter by review state (APPROVED, CHANGES_REQUESTED, COMMENTED, DISMISSED)--states <list>
— Show only unresolved threads--unresolved
— Exclude outdated threads--not_outdated
— Show only the last n replies per thread--tail <n>
— Include GraphQL node IDs for replies--include-comment-node-id
Resolve / Unresolve Threads
Toggle thread resolution status:
# Resolve a thread gh pr-review threads resolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo> # Unresolve a thread gh pr-review threads unresolve --thread-id <PRRT_...> --pr <number> --repo <owner/repo>
Bulk Resolve Example
# Get all unresolved thread IDs and resolve them gh pr-review threads list --pr 42 --unresolved --repo owner/repo | \ jq -r '.threads[].id' | \ xargs -I {} gh pr-review threads resolve --thread-id {} --pr 42 --repo owner/repo
Usage Notes
-
Repository Context: Always include
to ensure correct repository context, or run commands from within a local clone of the repository.--repo owner/repo -
Thread IDs: Thread IDs (format
) can be obtained fromPRRT_...
orreview view --include-comment-node-id
commands.threads list -
State Filters: When using
, provide a comma-separated list:--states--states APPROVED,CHANGES_REQUESTED -
Unresolved Focus: Use
together to focus on actionable comments that need attention.--unresolved --not_outdated