mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-09 02:54:40 +02:00
ci(blocked_prs): fix merge workflow
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
This commit is contained in:
parent
c2b7b4c82a
commit
c75ae4170f
14
.github/workflows/merge_blocking_pr.yml
vendored
14
.github/workflows/merge_blocking_pr.yml
vendored
@ -23,11 +23,9 @@ jobs:
|
||||
id: gather_deps
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
run: |
|
||||
owner="${{ github.repository_owner }}"
|
||||
owner_repo="${{ github.repository }}"
|
||||
repo="${owner_repo#"${owner}/"}"
|
||||
owner=$(echo "${{ github.repository }}" | cut -d '/' -f 1)
|
||||
repo=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
|
||||
blocked_prs=$(
|
||||
gh api graphql \
|
||||
-f repo="$repo" \
|
||||
@ -52,16 +50,16 @@ jobs:
|
||||
--paginate \
|
||||
--slurp \
|
||||
| jq -c --argjson pr "${{ github.event.pull_request.number }}" '
|
||||
[.[].data.repository.pullRequests.nodes[]] | .[] | select(
|
||||
reduce ( .[].data.repository.pullRequests.nodes[] | select(
|
||||
.bodyText |
|
||||
scan("(?:blocked (?:by|on)|stacked on):? #(?<num>[0-9]+)") |
|
||||
scan("(?:blocked (?:by|on)|stacked on):? #([0-9]+)") |
|
||||
map(tonumber) |
|
||||
any(.[]; . == $pr)
|
||||
)
|
||||
)) as $i ([]; . + [$i])
|
||||
'
|
||||
)
|
||||
echo "deps=$blocked_prs" >> "$GITHUB_OUTPUT"
|
||||
echo "numdeps='$(jq -r '. | length' <<< "$blocked_prs")"
|
||||
echo "numdeps=$(jq -r '. | length' <<< "$blocked_prs")" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Trigger Blocked PP Workflows for Dependants
|
||||
if: fromJSON(steps.gather_deps.outputs.numdeps) > 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user