actions/* + lib/* + CHANGELOG — merge upstream 0.6.0 onto the forge tree, and port every gh call site it brought (#198) #204
2 changed files with 19 additions and 1 deletions
|
|
@ -609,9 +609,22 @@ issue_payload_valid() { # $1 = the requested issue; payload on stdin
|
||||||
# one catches an HTTP 200 whose body is `null`, which exits 0 and empties it
|
# one catches an HTTP 200 whose body is `null`, which exits 0 and empties it
|
||||||
# just the same. `.number` is checked against the issue asked for, so a
|
# just the same. `.number` is checked against the issue asked for, so a
|
||||||
# payload about some other issue can never be reconciled as this one.
|
# payload about some other issue can never be reconciled as this one.
|
||||||
|
# THE EMPTINESS CHECK IS NOT REDUNDANT, and it is not stylistic. `jq -e`
|
||||||
|
# disagrees with itself across versions on empty input: jq 1.7 exits 4 (no
|
||||||
|
# valid result was ever produced), jq 1.6 exits **0**. This instance's
|
||||||
|
# runner image (ghcr.io/catthehacker/ubuntu:act-22.04) carries jq 1.6, so
|
||||||
|
# without this line an EMPTY payload reads as a valid issue payload here —
|
||||||
|
# the precise thing D3 added this guard to refuse — and the sweep would
|
||||||
|
# reconcile an issue from a body it never received. Measured both ways,
|
||||||
|
# 2026-08-05: `jq -e '<this filter>' </dev/null` → rc 0 on 1.6, rc 4 on 1.7.
|
||||||
|
# The test that caught it is upstream's own and passes on a GitHub runner
|
||||||
|
# (#198).
|
||||||
|
local payload
|
||||||
|
payload="$(cat)"
|
||||||
|
case "$payload" in *[![:space:]]*) ;; *) return 1 ;; esac
|
||||||
jq -e --arg n "$1" '
|
jq -e --arg n "$1" '
|
||||||
type == "object" and (.number | tostring) == $n and (.labels | type) == "array"
|
type == "object" and (.number | tostring) == $n and (.labels | type) == "array"
|
||||||
' >/dev/null 2>&1
|
' <<<"$payload" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
skipped_tail() { # $1 = skip count, $2 = the issue numbers → the D6 line, or nothing
|
skipped_tail() { # $1 = skip count, $2 = the issue numbers → the D6 line, or nothing
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,11 @@
|
||||||
speaks and refuses by name on a runner without it, instead of dying with
|
speaks and refuses by name on a runner without it, instead of dying with
|
||||||
`command not found` on every sweep. #205 ports it to REST (#198).
|
`command not found` on every sweep. #205 ports it to REST (#198).
|
||||||
|
|
||||||
|
- `issue_payload_valid` refuses an empty payload on jq 1.6 as well as 1.7.
|
||||||
|
`jq -e` exits 4 on empty input under 1.7 and **0** under 1.6, and this
|
||||||
|
instance's runner carries 1.6 — so the guard #247 D3 added to refuse an
|
||||||
|
unreadable read was accepting one here (#198).
|
||||||
|
|
||||||
- The post-merge nudge strips a trailing slash from the server URL, so a forge
|
- The post-merge nudge strips a trailing slash from the server URL, so a forge
|
||||||
URL carrying one does not render `//owner/repo` (#198).
|
URL carrying one does not render `//owner/repo` (#198).
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue