From d7dbcbfc62b515c56e6e06e9e777d8d7b82caa77 Mon Sep 17 00:00:00 2001 From: Jakob Nohe Date: Tue, 13 Feb 2024 10:40:04 +0100 Subject: [PATCH] Consider queued workflows as blocking --- src/github.ts | 2 +- src/wait.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/github.ts b/src/github.ts index 006d4fb..76d8195 100644 --- a/src/github.ts +++ b/src/github.ts @@ -45,7 +45,7 @@ export class OctokitGitHub { owner, repo, workflow_id, - status: "in_progress", + per_page: 100, }; if (branch) { diff --git a/src/wait.ts b/src/wait.ts index c1b7cfe..5d41b03 100644 --- a/src/wait.ts +++ b/src/wait.ts @@ -57,6 +57,7 @@ export class Waiter implements Wait { this.debug(`Found ${runs.length} ${this.workflowId} runs`); const previousRuns = runs .filter((run) => run.id < this.input.runId) + .filter((run) => ["in_progress", "queued"].includes(run.status ?? "")) .sort((a, b) => b.id - a.id); if (!previousRuns || !previousRuns.length) { setOutput("force_continued", "");