diff --git a/.github/workflows/blocked_prs.yml b/.github/workflows/blocked_prs.yml index ed07036af..d6239eedb 100644 --- a/.github/workflows/blocked_prs.yml +++ b/.github/workflows/blocked_prs.yml @@ -44,7 +44,7 @@ jobs: "prHeadSha": .head.sha, "prHeadLabel": .head.label, "prBody": .body, - "prLabels": reduce .labels[].name as $l ([]; . + [$l]) + "prLabels": (reduce .labels[].name as $l ([]; . + [$l])) } ' <<< "$PR_JSON")" } >> "$GITHUB_ENV" @@ -80,7 +80,7 @@ jobs: "prHeadSha": .head.sha, "prHeadLabel": .head.label, "prBody": .body, - "prLabels": reduce .labels[].name as $l ([]; . + [$l]) + "prLabels": (reduce .labels[].name as $l ([]; . + [$l])) } ' <<< "$PR_JSON")" } >> "$GITHUB_ENV" @@ -93,18 +93,24 @@ jobs: jq ' .prBody as $body | ( - $body | scan("blocked (?(?by)|(?on)):? #(?[0-9]+)") - | map({ - "type": "Blocked on", - "number": ( . | tonumber ) - }) + $body | + reduce ( + . | scan("blocked (?:by|on):? #([0-9]+)") + | map({ + "type": "Blocked on", + "number": ( . | tonumber ) + }) + ) as $i ([]; . + [$i]) ) as $bprs | ( - $body | scan("stacked on:? #(?[0-9]+)") - | map({ - "type": "Stacked on", - "number": ( . | tonumber ) - }) + $body | + reduce ( + . | scan("stacked on:? #([0-9]+)") + | map({ + "type": "Stacked on", + "number": ( . | tonumber ) + }) + ) as $i ([]; . + [$i]) ) as $sprs | ($bprs + $sprs) as $prs | {