Skip to content

Commit

Permalink
chore(prlint): add pagination to listFiles in PR
Browse files Browse the repository at this point in the history
  • Loading branch information
cplee committed Oct 19, 2022
1 parent 1298cf6 commit b17211b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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...");

Expand Down
1 change: 1 addition & 0 deletions tools/@aws-cdk/prlint/test/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
})
}

0 comments on commit b17211b

Please sign in to comment.