Skip to content

Commit b64c381

Browse files
x3ekclaude
andauthored
docs(github): resolve Copilot threads before merging (#81)
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) <noreply@anthropic.com>
1 parent 338deb0 commit b64c381

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.claude/skills/github/references/pull-requests.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ gh api repos/{owner}/{repo}/pulls/<num>/comments/<comment_id>/replies \
7878

7979
The bot reviews once per request. New commits don't auto-trigger a re-review — re-request the reviewer for a fresh pass.
8080

81+
### Resolve threads before merging
82+
83+
`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.
84+
85+
```bash
86+
gh api graphql -f query='{repository(owner:"xeek-dev",name:"squishmark"){pullRequest(number:<num>){reviewThreads(first:50){nodes{id isResolved}}}}}' \
87+
--jq '.data.repository.pullRequest.reviewThreads.nodes[] | select(.isResolved==false) | .id' \
88+
| while read -r ID; do
89+
gh api graphql -f query='mutation($id:ID!){resolveReviewThread(input:{threadId:$id}){thread{isResolved}}}' -f id="$ID"
90+
done
91+
```
92+
8193
## Merge
8294

8395
```bash

0 commit comments

Comments
 (0)