Resolving PR review threads via GitHub API
GitHub’s REST API doesn’t support resolving PR review threads. But the GraphQL API does.
Get thread IDs
Section titled “Get thread IDs”{ repository(owner: "owner", name: "repo") { pullRequest(number: 5) { reviewThreads(first: 10) { nodes { id isResolved comments(first: 1) { nodes { body } } } } } }}Resolve a thread
Section titled “Resolve a thread”mutation { resolveReviewThread(input: { threadId: "PRRT_kwDO..." }) { thread { isResolved } }}With gh CLI
Section titled “With gh CLI”# Get all thread IDsgh api graphql -f query='{ repository(owner: "owner", name: "repo") { pullRequest(number: 5) { reviewThreads(first: 10) { nodes { id isResolved comments(first: 1) { nodes { body } } } } } } }'
# Resolve onegh api graphql -f query='mutation { resolveReviewThread(input: {threadId: "PRRT_..."}) { thread { isResolved } } }'Useful for agents and CI automations that address review comments and want to mark them resolved automatically.