Skip to content

Commit

Permalink
Merge branch 'main' into huijbers/fix-max-len
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Dec 27, 2024
2 parents 7edd5e5 + c2bd634 commit 8b60eb9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tools/@aws-cdk/prlint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,8 @@ export class PullRequestLinter {
});
}

const comments = await this.client.issues.listComments(this.issueParams);
if (comments.data.find(comment => comment.body?.toLowerCase().includes("exemption request"))) {
const comments = await this.client.paginate(this.client.issues.listComments, this.issueParams);
if (comments.find(comment => comment.body?.toLowerCase().includes("exemption request"))) {
body += '\n\n✅ A exemption request has been requested. Please wait for a maintainer\'s review.';
}
await this.client.issues.createComment({
Expand Down Expand Up @@ -303,17 +303,17 @@ export class PullRequestLinter {
* @returns Existing review, if present
*/
private async findExistingPRLinterReview(): Promise<Review | undefined> {
const reviews = await this.client.pulls.listReviews(this.prParams);
return reviews.data.find((review) => review.user?.login === 'aws-cdk-automation' && review.state !== 'DISMISSED') as Review;
const reviews = await this.client.paginate(this.client.pulls.listReviews, this.prParams);
return reviews.find((review) => review.user?.login === 'aws-cdk-automation' && review.state !== 'DISMISSED') as Review;
}

/**
* Finds existing comment from previous review, if present
* @returns Existing comment, if present
*/
private async findExistingPRLinterComment(): Promise<Comment | undefined> {
const comments = await this.client.issues.listComments(this.issueParams);
return comments.data.find((comment) => comment.user?.login === 'aws-cdk-automation' && comment.body?.startsWith('The pull request linter fails with the following errors:')) as Comment;
const comments = await this.client.paginate(this.client.issues.listComments, this.issueParams);
return comments.find((comment) => comment.user?.login === 'aws-cdk-automation' && comment.body?.startsWith('The pull request linter fails with the following errors:')) as Comment;
}

/**
Expand Down

0 comments on commit 8b60eb9

Please sign in to comment.