Skip to content

Commit e2acc6c

Browse files
committed
Add pr supervisor
1 parent 35064e1 commit e2acc6c

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

.github/workflows/pr-supervisor.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@ on:
1313
branches:
1414
- develop
1515
- develop-2.0.0
16+
- develop-3.x.x
1617
- release/*
17-
18+
1819
concurrency:
1920
group: pr-${{ github.event.pull_request.number }}
2021
cancel-in-progress: true
@@ -26,32 +27,32 @@ jobs:
2627
steps:
2728
- name: Checkout repository
2829
uses: actions/checkout@v6
29-
30+
3031
- name: Wait and Verify Yamato Job Status
3132
env:
3233
GH_TOKEN: ${{ secrets.GH_TOKEN }}
3334
PR_NUMBER: ${{ github.event.pull_request.number }}
3435
run: |
3536
set -e
36-
37-
37+
38+
3839
MAX_ATTEMPTS=$((12*60))
3940
INTERVAL=60
40-
41+
4142
sleep $INTERVAL
4243
for ((i=1;i<=MAX_ATTEMPTS;i++)); do
4344
echo "Polling PR checks (attempt $i/$MAX_ATTEMPTS)..."
44-
45+
4546
# We want to watch for pending checks beside this check
4647
checks=$(gh pr checks $PR_NUMBER --json name,state --jq '[ .[] | select(.name != "yamato-supervisor") ]')
47-
48+
4849
pending=$(echo "$checks" | jq '[.[] | select(.state == "PENDING")] | length')
4950
skipping=$(echo "$checks" | jq '[.[] | select(.state == "SKIPPED")] | length')
5051
passed=$(echo "$checks" | jq '[.[] | select(.state == "SUCCESS")] | length')
5152
failed=$(echo "$checks" | jq '[.[] | select(.state == "FAILURE")] | length')
52-
53+
5354
echo "Pending checks: $pending, Skipping checks: $skipping", Passed checks: $passed, Failed checks: $failed
54-
55+
5556
if [[ "$failed" -gt 0 ]]; then
5657
echo "A check has failed! Failing fast."
5758
exit 1
@@ -61,6 +62,6 @@ jobs:
6162
echo "All non-supervisor checks are completed!"
6263
exit 0
6364
fi
64-
65+
6566
sleep $INTERVAL
66-
done
67+
done

0 commit comments

Comments
 (0)