Skip to content

Commit 15fd269

Browse files
authored
Change threshhold for postcommit open gate (#7933)
1 parent 19e15f7 commit 15fd269

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

.github/workflows/gate_postcommits.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,8 @@ jobs:
1515
queue_size=$(curl -Ls -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{github.token}}" -H "X-GitHub-Api-Version: 2022-11-28" \
1616
https://api.github.com/repos/${{github.repository}}/actions/runs?per_page=1000\&page=1\&status=queued\&event=pull_request_target | \
1717
jq '[.workflow_runs[] | {name,status,id,updated_at,"waiting_seconds":(now - (.updated_at | fromdate)), html_url}]' | \
18-
jq '[.[] | select(.waiting_seconds > 600)] | length')
18+
jq '[.[] | select(.waiting_seconds > 60)] | length')
1919
echo "Queue size: $queue_size"
20-
# temporary solution for https://www.githubstatus.com/incidents/m70hk23gx3nx (some workflows are uncancellable stuck)
2120
if (( queue_size > 0 ));then
2221
echo "Close gate for postcommits"
2322
query='.runners[] | select(.labels[].name=="ghrun") | select( any([.labels[].name][]; .=="postcommit")) | .id'
@@ -41,7 +40,6 @@ jobs:
4140
4241
echo "$j1" | sed '$d' | jq "$query" | while read x;do
4342
echo "Runner: $x"
44-
# temporary solution for https://www.githubstatus.com/incidents/m70hk23gx3nx (some workflows are uncancellable stuck)
4543
if (( queue_size > 0 ));then
4644
curl -Ls -X DELETE -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{secrets.GH_PERSONAL_ACCESS_TOKEN}}" \
4745
-H "X-GitHub-Api-Version: 2022-11-28" \

0 commit comments

Comments
 (0)