Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files
Also filteer non pr and push events
  • Loading branch information
n1hility committed Feb 19, 2020
1 parent a38415f commit beb7c0e54fcf533a777cc94eaadbcc9dffe31e6b
Showing 2 changed files with 6 additions and 2 deletions.
@@ -1546,7 +1546,8 @@ function cancelDuplicates(token, selfRunId, owner, repo, workflowId, branch, eve
matched = true;
core.info(`Matched ${selfRunId}`);
}
if ('completed' === element.status.toString()) {
if ('completed' === element.status.toString() ||
!['push', 'pull_request'].includes(element.event.toString)) {
continue;
}
// This is a set of one in the non-schedule case, otherwise everything is a candidate
@@ -109,7 +109,10 @@ async function cancelDuplicates(
core.info(`Matched ${selfRunId}`)
}

if ('completed' === element.status.toString()) {
if (
'completed' === element.status.toString() ||
!['push', 'pull_request'].includes(element.event.toString)
) {
continue
}

0 comments on commit beb7c0e

Please sign in to comment.