From 832f2acc536faa491f7f082b69d2a0f94a3e5de7 Mon Sep 17 00:00:00 2001 From: Michael Vawter Date: Sat, 3 Oct 2026 19:59:24 -0400 Subject: [PATCH] fix(coord): coord.sh done works when no comment links a PR Without --pr, done looks for a "pr: .../pull/N" comment. When none exists (a settings-only or decision issue), `last` is null, and capture() on a null body is a jq error, so done exited before posting DONE. Guard with select(. != null). coord.ps1 already checks for a match first. Co-Authored-By: Claude Opus 5.5 --- .claude/skills/coordinate/scripts/coord.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.claude/skills/coordinate/scripts/coord.sh b/.claude/skills/coordinate/scripts/coord.sh index 8f8aa91..80bbab4 100644 --- a/.claude/skills/coordinate/scripts/coord.sh +++ b/.claude/skills/coordinate/scripts/coord.sh @@ -485,7 +485,7 @@ cmd_done() { prurl="${OPT_pr:-}" if [ -z "$prurl" ]; then prurl="$(gh issue view "$N" --repo "$REPO" --json comments --jq \ - '[.comments[] | select(.body|test("pr: \\S+/pull/\\d+"))] | last | .body | capture("pr: (?\\S+/pull/\\d+)").u // empty')" + '[.comments[] | select(.body|test("pr: \\S+/pull/\\d+"))] | last | select(. != null) | .body | capture("pr: (?\\S+/pull/\\d+)").u')" fi if [ -n "$prurl" ]; then [[ "$prurl" =~ /pull/([0-9]+) ]] || die "cannot parse a PR number from: $prurl"