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: the label payload validator admits duplicate names and uppercase hex, and merges its refusal causes #1372
Deferred from #1334 under outcome 4, after two granted rounds. All three sit in labels_payload_ok in repo-config/configure.sh, the shared pre-flight validator for repo-config/labels.json.
Duplicate names pass. Two entries with the same name are accepted, apply_labels writes both last-wins, and check_labels asserts the first row against the second's live values, so the check fails on every run and no re-apply clears it. ruleset_id one function away already warns on a duplicate ruleset name for the same reason. Fix: (map(.name) | unique | length) == length in the validator.
Uppercase hex passes but never matches. The color test admits A2EEEF, and check_labels compares the payload color byte-exact against the stored one, so an uppercase entry applies and then reads as permanent drift if GitHub stores colors lowercased. Fix: lowercase-only in the test, or lowercase both sides of the comparison. Which GitHub does was not exercised, so confirm against the API when fixing.
One refusal message for five causes. The predicate folds unparseable, not an array, empty, out of contract, and jq itself failing into one boolean and discards jq's stderr, where check_settings separates "did not parse" from "declares no keys" on purpose. A jq built without regex support fails the predicate and blames a valid payload. Fix: split the parse step from the contract step, as the settings check does.
A constructed payload demonstrates each: two entries named a, one entry colored A2EEEF, and a payload run against a jq lacking test/1.
Activity
Tell Apart the Causes a Labels Payload Is Refused For (#2230)