From bffdecbd5b939d4d62e6a016efdb079d7d7444db Mon Sep 17 00:00:00 2001 From: Anton Arnaudov Date: Thu, 15 Oct 2026 00:58:33 +0300 Subject: [PATCH] ci(release): land.sh waits for the PR's workflow runs, not only its check runs Right after a job is re-run, its check run is briefly missing from the list, so every listed run read completed and #114 merged before its Windows tests finished. The wait now also needs no in-progress workflow run for the head commit. Co-Authored-By: Claude Opus 5.5 --- scripts/release/land.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/release/land.sh b/scripts/release/land.sh index 9c7fa344..081c2ba8 100755 --- a/scripts/release/land.sh +++ b/scripts/release/land.sh @@ -16,7 +16,10 @@ while :; do sha=${head#* } js=$(gh api "repos/$R/commits/$sha/check-runs?per_page=100" --jq '[.check_runs[]|select(.name|startswith("codecov/")|not)|{n:.name,s:.status,c:(.conclusion//"")}]') total=$(echo "$js" | jq length); open=$(echo "$js" | jq '[.[]|select(.s!="completed")]|length') - [ "$total" -ge 4 ] && [ "$open" = 0 ] && break + # A re-run job leaves the check-run list for a moment: count the workflow + # runs too, or a re-run's gap reads as "all done" (#114 merged that way). + runs=$(gh api "repos/$R/actions/runs?head_sha=$sha&per_page=100" --jq '[.workflow_runs[]|select(.status!="completed")]|length') + [ "$total" -ge 4 ] && [ "$open" = 0 ] && [ "$runs" = 0 ] && break sleep 60 done echo "$js" | jq -r '.[]|.c' | sort | uniq -c | sed "s/^/#$N /"