Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`)) {
Expand Down
8 changes: 5 additions & 3 deletions src/github-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,12 +189,14 @@ export class GitHubHelper {
workflowName: string
): Promise<string> {
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`) ||
Expand Down