Skip to content

Commit

Permalink
Consider queued workflows as blocking
Browse files Browse the repository at this point in the history
  • Loading branch information
foxylion committed Feb 13, 2024
1 parent aacb191 commit d7dbcbf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export class OctokitGitHub {
owner,
repo,
workflow_id,
status: "in_progress",
per_page: 100,
};

if (branch) {
Expand Down
1 change: 1 addition & 0 deletions src/wait.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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", "");
Expand Down

0 comments on commit d7dbcbf

Please sign in to comment.