Resolve a PR review comment thread using the GitHub CLI. ONLY use this as part of the pr-review-comments skill workflow after addressing a comment. Takes a comment ID (PRRC_...) and resolves its parent thread.
Helper skill to resolve PR review comment threads via the gh CLI. Only use this during the pr-review-comments workflow after you've addressed a comment.
gh CLI installed and authenticatedPRRC_...)After addressing a PR review comment, resolve its thread:
# Get repo info from git remote
REPO=$(gh repo view --json nameWithOwner -q .nameWithOwner)
# Get PR number for current branch
PR_NUMBER=$(gh pr view --json number -q .number)
The comment files use comment IDs (PRRC_...), but we need the thread ID (PRRT_...) to resolve. Query the PR to find it:
gh api graphql -f query='
query($owner: String!, $repo: String!, $pr: Int!) {
repository(owner: $owner, name: $repo) {
pullRequest(number: $pr) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
id
}
}
}
}
}
}
}' -f owner="OWNER" -f repo="REPO" -F pr=PR_NUMBER
Find the thread where comments.nodes[0].id matches your comment ID (e.g., PRRC_kwDOOjkBEM6gPPfE). The parent id is the thread ID (e.g., PRRT_kwDOOjkBEM5pQksb).
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "PRRT_..."}) {
thread {
isResolved
}
}
}'
For a known comment ID, you can combine these steps. Example for nebariai/nebari-mvp PR #3264:
# Query threads and find the one containing your comment ID
gh api graphql -f query='
query {
repository(owner: "nebariai", name: "nebari-mvp") {
pullRequest(number: 3264) {
reviewThreads(first: 100) {
nodes {
id
isResolved
comments(first: 1) {
nodes {
id
}
}
}
}
}
}
}'
Then resolve with the thread ID you found:
gh api graphql -f query='
mutation {
resolveReviewThread(input: {threadId: "PRRT_xxxxx"}) {
thread {
isResolved
}
}
}'
PRRC_) are nested inside threads (PRRT_). You resolve threads, not individual comments.