diff --git a/dist/index.js b/dist/index.js index 0f45306cb..724925195 100644 --- a/dist/index.js +++ b/dist/index.js @@ -391,8 +391,8 @@ class GitHubHelper { getWorkflow(repository, workflowName) { return __awaiter(this, void 0, void 0, function* () { core.debug(`Getting workflow ${workflowName} for repository ${repository}`); - const { data: workflows } = yield this.octokit.rest.actions.listRepoWorkflows(Object.assign({}, this.parseRepository(repository))); - for (const workflow of workflows.workflows) { + const workflows = yield this.octokit.paginate('GET /repos/{owner}/{repo}/actions/workflows', Object.assign(Object.assign({}, this.parseRepository(repository)), { per_page: 100 })); + for (const workflow of workflows) { core.debug(`Found workflow: ${workflow.path}`); if (workflow.path.endsWith(`${workflowName}.yml`) || workflow.path.endsWith(`${workflowName}.yaml`)) { diff --git a/src/github-helper.ts b/src/github-helper.ts index 3528aed4c..24192ab3c 100644 --- a/src/github-helper.ts +++ b/src/github-helper.ts @@ -189,12 +189,14 @@ export class GitHubHelper { workflowName: string ): Promise { core.debug(`Getting workflow ${workflowName} for repository ${repository}`) - const {data: workflows} = await this.octokit.rest.actions.listRepoWorkflows( + const workflows = await this.octokit.paginate( + 'GET /repos/{owner}/{repo}/actions/workflows', { - ...this.parseRepository(repository) + ...this.parseRepository(repository), + per_page: 100 } ) - for (const workflow of workflows.workflows) { + for (const workflow of workflows) { core.debug(`Found workflow: ${workflow.path}`) if ( workflow.path.endsWith(`${workflowName}.yml`) ||