-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(prlint): add pagination to listFiles in PR #22555
Conversation
Hi, thank you for taking the time to make and submit the change. While it looks good, seems that it has side-effects:
Look at that, a merge solved it! |
@Mergifyio update |
✅ Branch has been successfully updated |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🐙
@@ -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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for contributing! Your pull request will be updated from main and then merged automatically (do not update manually, and be sure to allow changes to be pushed to your fork). |
Currently, the `prlint` tool lists the files on a PR to enforce new integration tests are created for `feat` changes. The tool is not using pagination for list files and is using the default of `30` files per page. This means a PR could be incorrectly flagged for missing integration tests if the test files occur after the first 30 files in the PR. Example of this can be seen in aws#22455 This PR enables pagination on the `listFiles` call to ensure the validation rules are looking at all files in the PR, not just the first 30. ---- ### All Submissions: * [x] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) ### Adding new Unconventional Dependencies: * [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies) ### New Features * [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)? * [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)? *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Currently, the
prlint
tool lists the files on a PR to enforce new integration tests are created forfeat
changes. The tool is not using pagination for list files and is using the default of30
files per page. This means a PR could be incorrectly flagged for missing integration tests if the test files occur after the first 30 files in the PR.Example of this can be seen in #22455
This PR enables pagination on the
listFiles
call to ensure the validation rules are looking at all files in the PR, not just the first 30.All Submissions:
Adding new Unconventional Dependencies:
New Features
yarn integ
to deploy the infrastructure and generate the snapshot (i.e.yarn integ
without--dry-run
)?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license