-
-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cleanup all_but_latest #67
Conversation
console.log(`Found ${runningWorkflows.length} runs to cancel.`); | ||
for (const {id, head_sha, status} of runningWorkflows) { | ||
for (const {id, head_sha, status, html_url} of runningWorkflows) { | ||
console.log('Canceling run: ', {id, head_sha, status, html_url}); | ||
const res = await octokit.actions.cancelWorkflowRun({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missed opportunity to incorporate Promise.all performance optimization - that seemed useful based on other poster's experience
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
definitely would have to do 2 batches at that point though, while this implementation allows a simple loop
Upstream has integrated the "all_but_latest" feature - https://github.com/styfle/cancel-workflow-action/releases/tag/0.9.0 styfle/cancel-workflow-action#35 styfle/cancel-workflow-action#67
Upstream has integrated the "all_but_latest" feature - https://github.com/styfle/cancel-workflow-action/releases/tag/0.9.0 styfle/cancel-workflow-action#35 styfle/cancel-workflow-action#67
Follow up to #35