diff --git a/tools/@aws-cdk/prlint/lint.ts b/tools/@aws-cdk/prlint/lint.ts index d4c38e04a4b73..9f7904f4c501f 100644 --- a/tools/@aws-cdk/prlint/lint.ts +++ b/tools/@aws-cdk/prlint/lint.ts @@ -275,7 +275,7 @@ export class PullRequestLinter { const pr = (await this.client.pulls.get(this.prParams)).data; console.log(`⌛ Fetching files for PR number ${number}`); - const files = (await this.client.pulls.listFiles(this.prParams)).data; + const files = await this.client.paginate(this.client.pulls.listFiles, this.prParams); console.log("⌛ Validating..."); diff --git a/tools/@aws-cdk/prlint/test/lint.test.ts b/tools/@aws-cdk/prlint/test/lint.test.ts index 9a22289c7589d..ca417917af878 100644 --- a/tools/@aws-cdk/prlint/test/lint.test.ts +++ b/tools/@aws-cdk/prlint/test/lint.test.ts @@ -379,6 +379,7 @@ function configureMock(pr: linter.GitHubPr, prFiles?: linter.GitHubFile[]): lint client: { pulls: pullsClient as any, issues: issuesClient as any, + paginate: (method: any, args: any) => { return method(args).data }, } as any, }) }