fix(ship): skip Greptile triage when no PR exists yet (#3020)

/ship's first run on a branch dispatched a triage subagent only to learn
there was no PR. Step 10 now checks for a PR inline (gh's 'no pull requests
found') and records that Greptile runs on the PR once it exists; other gh
errors still dispatch so the child can report unavailable.

Co-authored-by: dgrant <dgrant@users.noreply.github.com>
This commit is contained in:
garrytananddgrant committed 2026-10-06 18:23:45 +00:00
1 parent 5b06b7b090
commit 23520a93ed
2 files changed
+16

No files matched your search

+8
View File
@@ -2,6 +2,14 @@
<!-- Regenerate: bun run gen:skill-docs -->
## Step 10: Address Greptile review comments (if PR exists)
Check for a PR first; with none there is nothing for Greptile to have reviewed:
```bash
_PR_ERR=$(gh pr view --json number -q .number 2>&1 >/dev/null) && echo "PR: exists" || case "$_PR_ERR" in *"no pull requests found"*) echo "PR: none" ;; *) echo "PR: unknown ($_PR_ERR)" ;; esac
```
`PR: none` → skip the dispatch, record "Greptile: runs on the PR once it exists; the next /ship or /review triages it", and continue to Step 11. Otherwise dispatch:
Dispatch a subagent through Agent with `subagent_type: "general-purpose"` and
`run_in_background: false`, using Step 7's shared foreground-dispatch rule.
It fetches and classifies all Greptile comments,
+8
View File
@@ -1,5 +1,13 @@
## Step 10: Address Greptile review comments (if PR exists)
Check for a PR first; with none there is nothing for Greptile to have reviewed:
```bash
_PR_ERR=$(gh pr view --json number -q .number 2>&1 >/dev/null) && echo "PR: exists" || case "$_PR_ERR" in *"no pull requests found"*) echo "PR: none" ;; *) echo "PR: unknown ($_PR_ERR)" ;; esac
```
`PR: none` → skip the dispatch, record "Greptile: runs on the PR once it exists; the next /ship or /review triages it", and continue to Step 11. Otherwise dispatch:
Dispatch a subagent through Agent with `subagent_type: "general-purpose"` and
`run_in_background: false`, using Step 7's shared foreground-dispatch rule.
It fetches and classifies all Greptile comments,