From a5cd3aab37ebc652a4e71f3c1cdc33a648ad557e Mon Sep 17 00:00:00 2001 From: Mike Hardy Date: Thu, 1 Apr 2021 12:47:46 -0500 Subject: [PATCH] fix: list maximum (100) workflows possible before paging This was suggested by @Gislebert in https://github.com/styfle/cancel-workflow-action/pull/59 the default was 30, this widens the number of workflows we scan to cancel the most workflows possible, without adding complication by paging --- dist/index.js | 1 + src/index.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/dist/index.js b/dist/index.js index b8a3bf29..a675ed37 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5885,6 +5885,7 @@ async function main() { await Promise.all(workflow_ids.map(async (workflow_id) => { try { const { data } = await octokit.actions.listWorkflowRuns({ + per_page: 100, owner, repo, workflow_id, diff --git a/src/index.ts b/src/index.ts index 7f927e9a..d80c5f4e 100644 --- a/src/index.ts +++ b/src/index.ts @@ -60,6 +60,7 @@ async function main(): Promise { workflow_ids.map(async workflow_id => { try { const { data } = await octokit.actions.listWorkflowRuns({ + per_page: 100, owner, repo, workflow_id,