Skip to content

Commit

Permalink
Do not throw error when workflow_run has been cancelled
Browse files Browse the repository at this point in the history
It's common to cancel all jobs/workflows after first error. There could still be test results user wants to see in a report
  • Loading branch information
Michal Dorner committed Mar 7, 2021
1 parent 073a4b9 commit cf4814e
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
3 changes: 0 additions & 3 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.

3 changes: 0 additions & 3 deletions src/utils/github-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ export function getCheckRunContext(): {sha: string; runId: number} {
if (!event.workflow_run) {
throw new Error("Event of type 'workflow_run' is missing 'workflow_run' field")
}
if (event.workflow_run.conclusion === 'cancelled') {
throw new Error(`Workflow run ${event.workflow_run.id} has been cancelled`)
}
return {
sha: event.workflow_run.head_commit.id,
runId: event.workflow_run.id
Expand Down

0 comments on commit cf4814e

Please sign in to comment.