Skip to content
Development
Command

/resolve-threads

Batch-resolve unresolved PR/MR review threads via GraphQL API (GitHub/GitLab)

From plugin
claude-night-market
325163 skills59 agents163 commands1 MCP
Install
$ npx -y skills add athola/claude-night-market --agent claude-code

How it fires

How this command gets triggered: by you, by Claude, or both.

  • Fires itselfClaude auto-loads it when your prompt matches the work.
  • You can call itInvoke it directly when you want it.
  • Slash command/resolve-threads

Context preview

What this command does when you run it.

Batch-resolve unresolved PR/MR review threads via GraphQL API (GitHub/GitLab)

Command definition

resolve-threads.md
name: resolve-threads
description: Batch-resolve unresolved PR/MR review threads via GraphQL API (GitHub/GitLab)
usage: /resolve-threads [<pr-number> | <pr-url> | <mr-url>]

Resolve PR Review Threads

Quickly resolve all unresolved review threads on a PR after fixes have been addressed.

When To Use

  • **Runs automatically** at the end of `/fix-pr` (Phase 7)
  • After manually addressing PR review comments outside `/fix-pr`
  • To clean up resolved conversations before merge
  • As a standalone verification command

When NOT To Use

  • Simple changes that don't need the full workflow
  • Work already completed through another sanctum command

Workflow

Step 1: Identify Target PR

# GitHub - if no PR specified, use current branch
gh pr view --json number,url -q '.number'

# GitLab
glab mr view --json iid -q '.iid'

Step 2: Fetch Unresolved Threads

# Replace OWNER, REPO, PR_NUMBER with actual values
gh api graphql -f query='
query {
  repository(owner: "OWNER", name: "REPO") {
    pullRequest(number: PR_NUMBER) {
      reviewThreads(first: 100) {
        nodes {
          id
          isResolved
          path
          line
          comments(first: 1) {
            nodes { body }
          }
        }
      }
    }
  }
}'

Step 3: Resolve Each Thread

For each unresolved thread:

gh api graphql -f query='
mutation {
  resolveReviewThread(input: {threadId: "PRRT_xxx"}) {
    thread { isResolved }
  }
}'

Step 4: Verify Resolution

# Should return 0
gh api graphql -f query='...' \
  --jq '[.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved == false)] | length'

Output

### Thread Resolution Summary

| Status | Count |
|--------|-------|
| Resolved | 15 |
| Already resolved | 3 |
| Failed | 0 |

All 18 review threads are now resolved.

Notes

  • Requires GitHub CLI with GraphQL access
  • Does NOT reply to threads - use `/fix-pr` for reply + resolve
  • Safe to run multiple times (idempotent)

See Also

  • `/fix-pr` - Full workflow for addressing PR comments (reply + resolve)
  • `/pr-review` - Review a PR and post findings as GitHub comments
Read more
Ships withclaude-night-market

A plugin marketplace for Claude Code. Install only the plugins you need to run git workflows, code review, spec-driven development, and autonomous agents from inside your Claude Code session.

Get the whole plugin, auto-invoked
Stats
325
Stars
0
Views
35
Forks
Active
Maintenance
Python
Language
MIT
License
1d ago
Last commit
8mo ago
Created

Repo: athola/claude-night-market