Skip to content

Commit

Permalink
report pending too
Browse files Browse the repository at this point in the history
  • Loading branch information
jnewland committed May 23, 2024
1 parent 3227b21 commit 2961f03
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
11 changes: 11 additions & 0 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

12 changes: 12 additions & 0 deletions src/required.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,18 @@ export async function required({
continue
}

if (pendingWorkflows.length > 0) {
await octokit.rest.repos.createCommitStatus({
...context.repo,
sha: head_sha,
state: 'pending',
context: statusName,
description: `${pendingWorkflows.length} of ${selectedWorkflows.length} required workflows are still pending...`,
target_url: pendingWorkflows[0].html_url
})
return
}

allRequiredSucceeded =
unSuccessfulWorkflows.length === 0 && pendingWorkflows.length === 0
}
Expand Down

0 comments on commit 2961f03

Please sign in to comment.