Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 23 additions & 1 deletion skills/git-workflow/evals/evals.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,5 +305,27 @@
"pattern": "(CLEAN is not sufficient|CLEAN isn.t sufficient|CLEAN alone|CLEAN can be stale|CLEAN doesn.t mean|not sufficient to merge|review_on_push|empty reviewRequests doesn|reviewRequests is not)"
}
]
},
{
"name": "old_head_review_clean_timeline_check",
"prompt": "PR has all checks green and mergeStateStatus CLEAN, but the only Copilot review is on the previous commit; I pushed a docs-only commit afterwards. Can I merge?",
"assertions": [
{
"type": "content",
"pattern": "(?i)timeline"
},
{
"type": "content",
"pattern": "(?i)review.?request"
},
{
"type": "content",
"pattern": "(?i)(after|since|following).{0,50}(push|commit|head)"
},
{
"type": "content",
"pattern": "(?i)(mergeable|safe to merge|can merge|merge it).{0,160}(no (new |further )?review|nothing (was )?announced|not.{0,20}announced)|((no (new |further )?review|nothing (was )?announced).{0,160}(mergeable|safe to merge|can merge))"
}
]
}
]
]
20 changes: 20 additions & 0 deletions skills/git-workflow/references/pull-request-workflow.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,6 +784,26 @@ Arm auto-merge / enqueue **only when all three hold**:
Bot reviews (Copilot, Gemini) land 2–5 minutes after each push — wait that
window out before concluding "no threads".

**Review on an earlier head + `CLEAN`: decide via the timeline, not the
review list.** After a follow-up push (docs-only changes often do not
re-trigger Copilot), the only review on record may sit on a previous commit
while `mergeStateStatus` reports `CLEAN` off it. Whether that is mergeable
depends on one question: was any review (re)announced *after* the latest
push? The reviews list cannot answer it — query the timeline events:

```bash
R=<owner/repo>; PR=<number>
gh api repos/$R/issues/$PR/timeline --jq \
'[.[] | select(.event=="review_requested" or .event=="reviewed")
| {event, actor: (.actor.login // .user.login), at: (.created_at // .submitted_at)}]'
```

- Last `review_requested` is **before** the latest push and a matching
`reviewed` followed it, no newer request → no review is in flight; the
old-head review + `CLEAN` is mergeable.
- A `review_requested` **after** the latest push with no `reviewed` yet →
a review is in flight; wait (see *Never merge over an announced review*).

**Recovery when armed too early:**

```bash
Expand Down
Loading