mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-05-09 19:14: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
|
id: gather_deps
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
run: |
|
run: |
|
||||||
owner="${{ github.repository_owner }}"
|
owner=$(echo "${{ github.repository }}" | cut -d '/' -f 1)
|
||||||
owner_repo="${{ github.repository }}"
|
repo=$(echo "${{ github.repository }}" | cut -d '/' -f 2)
|
||||||
repo="${owner_repo#"${owner}/"}"
|
|
||||||
blocked_prs=$(
|
blocked_prs=$(
|
||||||
gh api graphql \
|
gh api graphql \
|
||||||
-f repo="$repo" \
|
-f repo="$repo" \
|
||||||
@ -52,16 +50,16 @@ jobs:
|
|||||||
--paginate \
|
--paginate \
|
||||||
--slurp \
|
--slurp \
|
||||||
| jq -c --argjson pr "${{ github.event.pull_request.number }}" '
|
| jq -c --argjson pr "${{ github.event.pull_request.number }}" '
|
||||||
[.[].data.repository.pullRequests.nodes[]] | .[] | select(
|
reduce ( .[].data.repository.pullRequests.nodes[] | select(
|
||||||
.bodyText |
|
.bodyText |
|
||||||
scan("(?:blocked (?:by|on)|stacked on):? #(?<num>[0-9]+)") |
|
scan("(?:blocked (?:by|on)|stacked on):? #([0-9]+)") |
|
||||||
map(tonumber) |
|
map(tonumber) |
|
||||||
any(.[]; . == $pr)
|
any(.[]; . == $pr)
|
||||||
)
|
)) as $i ([]; . + [$i])
|
||||||
'
|
'
|
||||||
)
|
)
|
||||||
echo "deps=$blocked_prs" >> "$GITHUB_OUTPUT"
|
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
|
- name: Trigger Blocked PP Workflows for Dependants
|
||||||
if: fromJSON(steps.gather_deps.outputs.numdeps) > 0
|
if: fromJSON(steps.gather_deps.outputs.numdeps) > 0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user