Skip to content

Commit

Permalink
avoid enqueue runs
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGOrtega committed Jun 18, 2021
1 parent 29e741d commit 22679ea
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/drivers/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,23 @@ class Github {
// HANDLES: Cannot cancel a workflow run that is completed.
}

try {
await actions.reRunWorkflow({
owner,
repo,
run_id
});
} catch (err) {}
const {
data: { status }
} = await actions.getWorkflowRun({
owner,
repo,
run_id
});

if (status !== 'queued') {
try {
await actions.reRunWorkflow({
owner,
repo,
run_id
});
} catch (err) {}
}
}

get sha() {
Expand Down

0 comments on commit 22679ea

Please sign in to comment.