Describe the bug
I've reviewed and approved this PR as a Trusted Community Reviewer.
But it doesn't get the pr/needs-maintainer-review label. It seems to be in CHANGES_REQUESTED state and communityApproved is also false in the job PR Linter / validate-pr. (Please see this comment in the PR.)
I checked the prlint's log in the GitHub Actions output, and it appears that there is too much history (such as comments) to get all the latest data.
List reviews for a pull request in GitHub API can get 30 items per page, however, prlint is not implemented to handle pagination.
private async assessNeedsReview(
pr: Pick<GitHubPr, 'mergeable_state' | 'draft' | 'labels' | 'number'>,
): Promise<void> {
const reviews = await this.client.pulls.listReviews(this.prParams);
Therefore, when there are more than 30 comments or change requests, the review label is no longer displayed.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The pr/needs-maintainer-review label appears when a PR is approved even if there are too many comments or change requests.
Current Behavior
The label doesn't appear when a PR is approved if there are too many comments or change requests.
Reproduction Steps
- Submit a PR
- Make more than 30 comments or CHANGES_REQUESTED by a trusted community reviewer
- Approve by the reviewer
Possible Solution
Use pagination for listReviews in the octokit library.
https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination
before
await this.client.pulls.listReviews(this.prParams);
after
await this.client.paginate(this.client.pulls.listReviews, this.prParams);
Additional Information/Context
PRs that have been unlabelled, probably as a result of this issue.
CDK CLI Version
v2.155.0
Framework Version
No response
Node.js Version
18
OS
Depending on GitHub Actions
Language
TypeScript
Language Version
No response
Other information
No response
Describe the bug
I've reviewed and approved this PR as a Trusted Community Reviewer.
But it doesn't get the
pr/needs-maintainer-reviewlabel. It seems to be inCHANGES_REQUESTEDstate andcommunityApprovedis also false in the jobPR Linter / validate-pr. (Please see this comment in the PR.)I checked the prlint's log in the GitHub Actions output, and it appears that there is too much history (such as comments) to get all the latest data.
List reviews for a pull request in GitHub API can get 30 items per page, however, prlint is not implemented to handle pagination.
Therefore, when there are more than 30 comments or change requests, the review label is no longer displayed.
Regression Issue
Last Known Working CDK Version
No response
Expected Behavior
The
pr/needs-maintainer-reviewlabel appears when a PR is approved even if there are too many comments or change requests.Current Behavior
The label doesn't appear when a PR is approved if there are too many comments or change requests.
Reproduction Steps
Possible Solution
Use pagination for listReviews in the octokit library.
https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination
before
after
Additional Information/Context
PRs that have been unlabelled, probably as a result of this issue.
containerCpuandcontainerMemoryLimitMiBproperty toApplicationLoadBalancedFargateService#30920CDK CLI Version
v2.155.0
Framework Version
No response
Node.js Version
18
OS
Depending on GitHub Actions
Language
TypeScript
Language Version
No response
Other information
No response