File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed
Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 2323 id : gather_deps
2424 env :
2525 GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26-
2726 run : |
28- owner="${{ github.repository_owner }}"
29- owner_repo="${{ github.repository }}"
30- repo="${owner_repo#"${owner}/"}"
27+ owner=$(echo "${{ github.repository }}" | cut -d '/' -f 1)
28+ repo=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
3129 blocked_prs=$(
3230 gh api graphql \
3331 -f repo="$repo" \
@@ -52,16 +50,16 @@ jobs:
5250 --paginate \
5351 --slurp \
5452 | jq -c --argjson pr "${{ github.event.pull_request.number }}" '
55- [ .[].data.repository.pullRequests.nodes[]] | . [] | select(
53+ reduce ( .[].data.repository.pullRequests.nodes[] | select(
5654 .bodyText |
57- scan("(?:blocked (?:by|on)|stacked on):? #(?<num> [0-9]+)") |
55+ scan("(?:blocked (?:by|on)|stacked on):? #([0-9]+)") |
5856 map(tonumber) |
5957 any(.[]; . == $pr)
60- )
58+ )) as $i ([]; . + [$i])
6159 '
6260 )
6361 echo "deps=$blocked_prs" >> "$GITHUB_OUTPUT"
64- echo "numdeps=' $(jq -r '. | length' <<< "$blocked_prs")"
62+ echo "numdeps=$(jq -r '. | length' <<< "$blocked_prs")" >> "$GITHUB_OUTPUT "
6563
6664 - name : Trigger Blocked PP Workflows for Dependants
6765 if : fromJSON(steps.gather_deps.outputs.numdeps) > 0
You can’t perform that action at this time.
0 commit comments