-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
prlint: a review label doesn't appear when a PR is approved if there are too many comments #31294
Closed
1 task
go-to-k opened this issue
Sep 3, 2024
· 2 comments
· Fixed by #31290 or softwaremill/tapir#4137 · May be fixed by NOUIY/aws-solutions-constructs#128, NOUIY/aws-solutions-constructs#129 or NOUIY/aws-solutions-constructs#130
Closed
1 task
prlint: a review label doesn't appear when a PR is approved if there are too many comments #31294
go-to-k opened this issue
Sep 3, 2024
· 2 comments
· Fixed by #31290 or softwaremill/tapir#4137 · May be fixed by NOUIY/aws-solutions-constructs#128, NOUIY/aws-solutions-constructs#129 or NOUIY/aws-solutions-constructs#130
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
package/tools
Related to AWS CDK Tools or CLI
Comments
go-to-k
added
bug
This issue is a bug.
needs-triage
This issue or PR still needs to be triaged.
labels
Sep 3, 2024
1 task
ashishdhingra
added
p2
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
and removed
needs-triage
This issue or PR still needs to be triaged.
labels
Sep 3, 2024
@go-to-k Thanks the reporting the issue and the PR. I have communicated this to the team for review. |
ashishdhingra
added
effort/small
Small work item – less than a day of effort
and removed
investigating
This issue is being investigated and/or work is in progress to resolve the issue.
labels
Sep 3, 2024
mergify bot
pushed a commit
that referenced
this issue
Sep 3, 2024
…here are too many comments (#31290) ### Issue # (if applicable) Closes #31294 . ### Reason for this change I've reviewed and approved [this PR](#30920) 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](#30920 (comment)).) I checked [the prlint's log](https://github.com/aws/aws-cdk/blob/main/tools/@aws-cdk/prlint/lint.ts#L377) in [the GitHub Actions output](https://github.com/aws/aws-cdk/actions/runs/10669155243/job/29570426536), and it appears that there is too much history (such as comments) to get all the latest data. [List reviews for a pull request](https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request) in GitHub API can get 30 items per page, however, [prlint is not implemented to handle pagination](https://github.com/aws/aws-cdk/blob/main/tools/%40aws-cdk/prlint/lint.ts#L376). ```ts 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. ### Description of changes Use pagination for listReviews in the octokit library. https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination before ```ts await this.client.pulls.listReviews(this.prParams); ``` after ```ts await this.client.paginate(this.client.pulls.listReviews, this.prParams); ``` ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Comments on closed issues and PRs are hard for our team to see. |
pahud
pushed a commit
to pahud/aws-cdk
that referenced
this issue
Sep 9, 2024
…here are too many comments (aws#31290) ### Issue # (if applicable) Closes aws#31294 . ### Reason for this change I've reviewed and approved [this PR](aws#30920) 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](aws#30920 (comment)).) I checked [the prlint's log](https://github.com/aws/aws-cdk/blob/main/tools/@aws-cdk/prlint/lint.ts#L377) in [the GitHub Actions output](https://github.com/aws/aws-cdk/actions/runs/10669155243/job/29570426536), and it appears that there is too much history (such as comments) to get all the latest data. [List reviews for a pull request](https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request) in GitHub API can get 30 items per page, however, [prlint is not implemented to handle pagination](https://github.com/aws/aws-cdk/blob/main/tools/%40aws-cdk/prlint/lint.ts#L376). ```ts 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. ### Description of changes Use pagination for listReviews in the octokit library. https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination before ```ts await this.client.pulls.listReviews(this.prParams); ``` after ```ts await this.client.paginate(this.client.pulls.listReviews, this.prParams); ``` ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
xazhao
pushed a commit
to xazhao/aws-cdk
that referenced
this issue
Sep 12, 2024
…here are too many comments (aws#31290) ### Issue # (if applicable) Closes aws#31294 . ### Reason for this change I've reviewed and approved [this PR](aws#30920) 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](aws#30920 (comment)).) I checked [the prlint's log](https://github.com/aws/aws-cdk/blob/main/tools/@aws-cdk/prlint/lint.ts#L377) in [the GitHub Actions output](https://github.com/aws/aws-cdk/actions/runs/10669155243/job/29570426536), and it appears that there is too much history (such as comments) to get all the latest data. [List reviews for a pull request](https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request) in GitHub API can get 30 items per page, however, [prlint is not implemented to handle pagination](https://github.com/aws/aws-cdk/blob/main/tools/%40aws-cdk/prlint/lint.ts#L376). ```ts 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. ### Description of changes Use pagination for listReviews in the octokit library. https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination before ```ts await this.client.pulls.listReviews(this.prParams); ``` after ```ts await this.client.paginate(this.client.pulls.listReviews, this.prParams); ``` ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
GavinZZ
pushed a commit
that referenced
this issue
Sep 12, 2024
…here are too many comments (#31290) ### Issue # (if applicable) Closes #31294 . ### Reason for this change I've reviewed and approved [this PR](#30920) 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](#30920 (comment)).) I checked [the prlint's log](https://github.com/aws/aws-cdk/blob/main/tools/@aws-cdk/prlint/lint.ts#L377) in [the GitHub Actions output](https://github.com/aws/aws-cdk/actions/runs/10669155243/job/29570426536), and it appears that there is too much history (such as comments) to get all the latest data. [List reviews for a pull request](https://docs.github.com/en/rest/pulls/reviews?apiVersion=2022-11-28#list-reviews-for-a-pull-request) in GitHub API can get 30 items per page, however, [prlint is not implemented to handle pagination](https://github.com/aws/aws-cdk/blob/main/tools/%40aws-cdk/prlint/lint.ts#L376). ```ts 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. ### Description of changes Use pagination for listReviews in the octokit library. https://github.com/octokit/octokit.js?tab=readme-ov-file#pagination before ```ts await this.client.pulls.listReviews(this.prParams); ``` after ```ts await this.client.paginate(this.client.pulls.listReviews, this.prParams); ``` ### Description of how you validated changes ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p2
package/tools
Related to AWS CDK Tools or CLI
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 inCHANGES_REQUESTED
state andcommunityApproved
is 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-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
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.
containerCpu
andcontainerMemoryLimitMiB
property 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
The text was updated successfully, but these errors were encountered: