From 6a9e9760ac53e54546cc86503e54104ddbe022b9 Mon Sep 17 00:00:00 2001 From: Xeek <6032840+x3ek@users.noreply.github.com> Date: Sat, 16 May 2026 08:20:08 -0500 Subject: [PATCH] docs(github): resolve Copilot threads before merging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hit this on PR #78: all checks green, no required approvals, but gh pr merge returned mergeStateStatus=BLOCKED because the 3 Copilot review threads weren't resolved. Replying to a thread doesn't resolve it — it's a separate action via the resolveReviewThread GraphQL mutation. Document the resolve-all-threads one-liner so future PRs don't get stuck the same way. Co-Authored-By: Claude Opus 4.7 (1M context) --- .claude/skills/github/references/pull-requests.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/.claude/skills/github/references/pull-requests.md b/.claude/skills/github/references/pull-requests.md index 04fb9cf..3cd0d6b 100644 --- a/.claude/skills/github/references/pull-requests.md +++ b/.claude/skills/github/references/pull-requests.md @@ -78,6 +78,18 @@ gh api repos/{owner}/{repo}/pulls//comments//replies \ The bot reviews once per request. New commits don't auto-trigger a re-review — re-request the reviewer for a fresh pass. +### Resolve threads before merging + +`main` requires conversation resolution. Replying to a Copilot thread does **not** mark it resolved — that's a separate action. Without resolving, `gh pr merge` fails with `mergeStateStatus: BLOCKED` even with all checks green and no required approvals. + +```bash +gh api graphql -f query='{repository(owner:"xeek-dev",name:"squishmark"){pullRequest(number:){reviewThreads(first:50){nodes{id isResolved}}}}}' \ + --jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved==false) | .id' \ +| while read -r ID; do + gh api graphql -f query='mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}' -f id="$ID" + done +``` + ## Merge ```bash