Skip to content

Commit 2452fc5

Browse files
committed
skills(running-tend): fix closed-PR lookup snippet
Apply review feedback on the new closed-PR lookup. Two issues surfaced when the snippet was actually run: - `--search "fix/ci- in:head"` doesn't constrain to fix/ci-* branches. `in:head` isn't a valid issues/PRs search qualifier and is silently ignored, so the search degrades to default-field text matching and pulls in nightly/daily/hourly PRs whose titles contain "fix" or "ci". Use `head:fix/ci-` instead. - `--json` omitted `body`, where the failure diagnostic from `gh run view --log-failed` is embedded in the PR description. Without `body` there's nothing to shape-match against; `comments` only carries the maintainer's rejection rationale. Add `body`. Verified locally: `head:fix/ci-` returns only fix/ci-* branches and the body field carries the PR description, including the run-link block.
1 parent 44700c5 commit 2452fc5

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

‎.claude/skills/running-tend/SKILL.md‎

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,24 @@ Before opening a `fix/ci-*` PR, classify the failure:
9898
upstream", "won't fix"), do **not** open another PR. The bundled
9999
`tend-ci-runner:ci-fix` open-PR check (`gh pr list --state open --head
100100
"fix/ci-"`) misses closed PRs, so add a closed-state lookup before
101-
classifying:
101+
classifying. Use the `head:fix/ci-` search qualifier (not `in:head`,
102+
which is silently ignored and falls back to default-field text matching),
103+
and request `body` in `--json` so the failure diagnostic embedded in the
104+
PR description is available for shape-matching:
102105

103106
```bash
104107
BOT_LOGIN=$(gh api user --jq '.login')
105-
gh pr list --state closed --author "$BOT_LOGIN" --search "fix/ci- in:head" \
106-
--json number,title,closedAt,comments,headRefName \
108+
gh pr list --state closed --author "$BOT_LOGIN" --search "head:fix/ci-" \
109+
--json number,title,closedAt,body,comments,headRefName \
107110
--jq '[.[] | select((now - (.closedAt | fromdateiso8601)) < 1209600)] | .[]'
108111
```
109112

110113
Match by failure shape (the diagnostic snippet from `gh run view
111-
--log-failed`), not branch name — branches encode run IDs and never repeat.
112-
If a closed PR with maintainer rejection covers the same failure, exit
113-
silently. The maintainer already saw the diagnosis; another comment is
114-
noise.
114+
--log-failed` against the PR `body`), not branch name — branches encode
115+
run IDs and never repeat. The maintainer's rejection rationale typically
116+
lives in `comments` (closure comment or review). If a closed PR with
117+
maintainer rejection covers the same failure, exit silently. The
118+
maintainer already saw the diagnosis; another comment is noise.
115119
- **Real regression** — proceed with a fix PR.
116120

117121
**Lychee link-check timeouts are always transient** unless the same URL has

0 commit comments

Comments
 (0)