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
configure.sh's ruleset_id() Still Reads a Plain jq -r, Blocking check_ruleset() on Windows #1253
Next in the #1123/#1234/#1246 chain. repo-config/configure.sh's ruleset_id() still reads a ruleset id with a plain jq -r rather than the jqr() helper #1229 introduced, and it sits directly upstream of check_ruleset(), the function #1246 just fixed.
The defect
ids="$(jq -r --arg n "$1"'.[] | select(.name==$n) | .id'<<<"$out")"
(repo-config/configure.sh, ruleset_id(), around line 125.) ruleset_id() is called from check_ruleset() (id="$(ruleset_id "$rname")") and from apply_ruleset(). On a native Windows jq, the returned id carries a trailing \r. The [ -z "$id" ] guard passes (the string is non-empty), and the CR-suffixed id is then interpolated straight into the API URL: gh api "repos/$repo/rulesets/$id". That request targets rulesets/<id>\r, which fails outright, so check_ruleset() reports "could not read live state" (or apply_ruleset() aborts) before the comparisons #1246 just fixed are ever reached.
This is the same CRLF-exposure class #1123/#1234/#1246 already fixed at three other sites in the same file, on the one remaining call in check_ruleset()'s own dependency chain.
Secondary, cosmetic-only
Same function, the bypass-list extraction also uses plain jq -r:
This value only feeds a note() display line (never compared or asserted), so a trailing \r here would corrupt a printed diagnostic, not a check's pass/fail result. Worth fixing for consistency while the other sites are being swept, but not itself a false pass/fail.
Suggested fix
Route both extractions through jqr(), matching the treatment check_settings() and the rest of check_ruleset() (after #1246) already get.
Context
Found via an adversarial local-review pass while fixing #1246. Filed separately to keep that PR scoped to its assigned function.
Unverified on a real Windows host, same as #1123/#1234/#1246.
Activity
Fix configure.sh's Ruleset Type-Loop CRLF False Pass (#1254)
Promote Develop to Main: Settle Section 5 and the CRLF Chain (#1263)
Route configure.sh's ruleset_id() Through jqr (#1253) (#1883)
Route ruleset_id()'s Per-Page Guard Through jqr (#1972)