You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Fix gh api stdout-on-error bug in close-linked-issues.yml #370
The parent-issue lookup step in .github/workflows/close-linked-issues.yml
(added in #369) breaks on any issue with no parent (e.g. a standalone
scripts/flow.py issue ticket, or an OpenSpec change's own parent issue).
`gh api ... --jq '.number'` writes the raw error JSON body to STDOUT
(not just a message to stderr) when the HTTP call itself fails, then
exits 1. The `parent=$(... 2>/dev/null || echo "")` fallback only
discards stdout on failure via the OR branch, but by then the error
body is already captured inside the command substitution, concatenated
with echo's empty output — so $parent ends up holding the raw error
JSON, which then gets used as a URL path segment in the next gh api
call and fails with "unsupported protocol scheme".
Confirmed live: PR #369's own merge run closed #368 successfully, then
crashed exactly this way since #368 (a standalone ticket) has no parent.
Fix: check the command's own exit status (`if ! parent=$(...); then`)
instead of trusting the captured string, so a failed lookup is detected
even though gh still wrote something to stdout. Verified locally with a
mock gh reproducing the 404-writes-to-stdout behavior, and against the
live #363/#361 parent/summary lookup for the success path.
Activity
fix(workflow): check exit code, not emptiness, for parent-issue lookup (