Skip to content
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

Merged
merged 7 commits into from Apr 11, 2021
Merged

Cleanup all_but_latest #67

merged 7 commits into from Apr 11, 2021

Conversation

styfle
Copy link
Owner

@styfle styfle commented Apr 11, 2021

Follow up to #35

@styfle styfle merged commit 1f01010 into main Apr 11, 2021
@styfle styfle deleted the cleanup-all-but-latest branch April 11, 2021 02:11
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({
Copy link
Contributor

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

Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants