Skip to content

Commit 8b02ceb

Browse files
Merge pull request #3167 from pierreb-devkit/fix/pull-request-skill-resolve-all-threads
fix(pull-request skill): reply and resolve all threads including non-actionable
2 parents cc6144f + a8c4e7e commit 8b02ceb

File tree

1 file changed

+17
-9
lines changed

1 file changed

+17
-9
lines changed

.claude/skills/pull-request/SKILL.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: pull-request
3-
description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero actionable threads).
3+
description: Full PR lifecycle — branch, commit, issue, draft PR, CI, ready, autonomous monitor loop (fix comments, resolve threads, iterate until CI green and zero open threads).
44
---
55

66
# Pull Request Skill
@@ -121,13 +121,19 @@ After `gh pr ready`, enter an autonomous polling loop. Do not wait for the user
121121
### Loop procedure
122122

123123
```text
124+
consecutive_zero = 0
125+
124126
REPEAT:
125-
1. Wait for CI → sleep 30 then gh pr checks <number> --watch
126-
2. If CI fails → fix, /verify, commit, push, GOTO 1
127-
3. Grace period → sleep 180 + adaptive check (see 6b)
128-
4. Read all feedback → unresolved threads only (see 6b)
129-
5. If actionable comments → fix all, /verify, commit, push, reply, resolve, GOTO 1
130-
6. If zero new actionable → check branch protection (see 6f), then STOP ✓
127+
1. Wait for CI → sleep 30 then gh pr checks <number> --watch
128+
2. If CI fails → fix, /verify, commit, push, consecutive_zero=0, GOTO 1
129+
3. Grace period → sleep 180 + adaptive check (see 6b)
130+
4. Re-check pending review checks → gh pr checks <number> — if any still pending, GOTO 3
131+
5. Read all feedback → unresolved threads only (see 6b)
132+
6. If actionable comments → fix all, /verify, commit, push, reply, resolve, consecutive_zero=0, GOTO 1
133+
7. If non-actionable unresolved → reply all explaining why, resolve all, consecutive_zero=0, GOTO 5
134+
8. If zero unresolved threads → consecutive_zero++
135+
if consecutive_zero >= 2 → check branch protection (see 6f), then STOP ✓
136+
else GOTO 3
131137
```
132138

133139
### 6a. Wait for CI
@@ -200,7 +206,9 @@ gh api repos/$OWNER/$REPO/issues/$PR/comments --paginate | jq 'map({id, user: .u
200206

201207
**Actionable** (must fix): change requests, bug reports, missing tests, security issues, code suggestions.
202208

203-
**Informational** (skip): "LGTM", approvals, "coverage up from X% to Y%", "no issues found", style preferences without a change request.
209+
**Informational** (no code change needed, but must still be addressed): "LGTM", approvals, "coverage up from X% to Y%", "no issues found", style preferences without a change request, false positives (e.g. bot references a file that doesn't exist).
210+
- If the comment is an unresolved **review thread**: reply briefly explaining why no action is needed, then resolve via GraphQL (see `references/monitoring.md`).
211+
- If the comment is a **PR-level or issue comment** (e.g. codecov report, approval message): reply if useful, but these cannot be resolved via GitHub's thread API — they do not count as open threads.
204212

205213
### 6c. Fix all actionable comments from this pass
206214

@@ -237,7 +245,7 @@ Loop back to step 6a. Do not attempt to trigger reviewers — reviews arrive on
237245
238246
### 6f. Stop condition
239247

240-
All CI checks pass **and** a complete polling pass (after the grace period) produces **zero unresolved actionable threads**.
248+
All CI checks pass **and** 2 consecutive polling passes (each after a full grace period) both produce **zero unresolved threads** — this double-pass ensures slow review bots have had time to post before the loop exits.
241249

242250
Before declaring done, check branch protection:
243251

0 commit comments

Comments
 (0)