ci: close superseded regen PRs before generation (#335)
* ci: close superseded regen PRs before generation
The nightly Generate job aborts whenever the previous regen PR is still
open. Speakeasy's action reuses that PR's branch, then rejects it because
signed_commits makes it author commits as github-actions[bot] — a name
absent from its own automation allow-list — so it reads its own commit as
an external push.
Add a gating job that closes unapproved bot regen PRs first, so the action
starts from a fresh branch. 40 of 92 scheduled nights failed this way
between May 1 and Jul 31; replaying the review state at each run's start
time, all 40 would have proceeded.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
* ci: keep the branch when sweeping a regen PR
Closing the PR is enough to free the branch: the action only reuses
branches that have an open PR, so a dangling branch is invisible to it.
Keeping it makes the sweep recoverable. Half of the runs that clear the
guard still fail for unrelated reasons (26 of 52 in the May-Jul window), and
in that case the swept PR can simply be reopened rather than waiting for a
later green run.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
github.com-vercel-sdk · 4a7287fd · 2026-07-31