Skip to content

Commit fb8f52d

Browse files
committed
fix(ci): show GitHub casing for blocked-label errors
Emit each label's original .name from the PR payload when it matches the blocked list case-insensitively, instead of lowercased names from jq. Made-with: Cursor
1 parent 1cb9360 commit fb8f52d

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

.github/workflows/pr-metadata-check.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,16 @@ jobs:
8787
fi
8888
8989
# Block PRs with labels that indicate they are not ready to merge.
90-
# Match blocked labels exactly (case-insensitively) using the PR
91-
# payload we already have, instead of doing substring matches.
90+
# Match blocked label names exactly (case-insensitively); emit the
91+
# original spelling from the payload so error text matches GitHub.
9292
BLOCKED_LABELS=$(jq -r '
93-
[.[].name | ascii_downcase] as $pr_labels
94-
| ["blocked", "do not merge"] as $blocking
95-
| $pr_labels - ($pr_labels - $blocking)
93+
(["blocked", "do not merge"]) as $blocking
9694
| .[]
95+
| .name as $n
96+
| if ($blocking | index($n | ascii_downcase)) != null
97+
then $n
98+
else empty
99+
end
97100
' <<<"$LABELS")
98101
while IFS= read -r label; do
99102
[ -n "$label" ] || continue

0 commit comments

Comments
 (0)