From 0680f01bf79000cee5f91f3bd08fe30a3f023b09 Mon Sep 17 00:00:00 2001 From: Christine Chen <10511452+christineschen@users.noreply.github.com> Date: Thu, 25 Jun 2026 16:20:53 -0400 Subject: [PATCH] fix: proceed on checkless regen PRs in wait_for_checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Speakeasy regen PRs are opened with the workflow GITHUB_TOKEN, which by design does not trigger downstream on: pull_request runs, so they carry zero status checks. main has no required checks either, so gh pr merge --auto no-ops and the direct-merge fallback calls wait_for_checks. The empty-rollup arm only `continue`d, so TOTAL stayed 0 until the 600s timeout and the function exit 1'd — failing auto-merge on every regen PR. Add a 60s grace window for checks to register, then treat a persistently empty rollup as "no checks to wait for" and return 0 so the direct squash merge proceeds. Matches the fix already shipped in go-sdk #318. --- .github/workflows/auto-merge-speakeasy-pr.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/auto-merge-speakeasy-pr.yaml b/.github/workflows/auto-merge-speakeasy-pr.yaml index c4c4b5b..5ec1cce 100644 --- a/.github/workflows/auto-merge-speakeasy-pr.yaml +++ b/.github/workflows/auto-merge-speakeasy-pr.yaml @@ -159,6 +159,13 @@ jobs: '[.statusCheckRollup[]? | select(.status == "COMPLETED") | select(.conclusion != "SUCCESS" and .conclusion != "SKIPPED" and .conclusion != "NEUTRAL")] | length') if [ "$TOTAL" -eq 0 ]; then + # GITHUB_TOKEN-authored regen PRs get no pull_request checks at all, + # so TOTAL stays 0 forever. Wait a short grace window in case checks + # are merely slow to register, then proceed rather than time out. + if [ "$elapsed" -ge 60 ]; then + echo "No checks registered after ${elapsed}s — proceeding (checkless PR)" + return 0 + fi echo "Checks not yet registered — waiting ${interval}s..." sleep "$interval" elapsed=$((elapsed + interval))