Skip to content

Commit

Permalink
chore(prlint): dismissed reviews should not count as requested changes (
Browse files Browse the repository at this point in the history
#26552)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
kaizencc authored Jul 31, 2023
1 parent cb97232 commit 960d14a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ export class PullRequestLinter {
);
const communityRequestedChanges = reviews.data.some(
review => this.getTrustedCommunityMembers().includes(review.user?.login ?? '')
&& review.state !== 'APPROVED', // community members cannot request changes
&& review.state === 'COMMENTED', // community members can only approve or comment
);
const communityApproved = reviews.data.some(
review => this.getTrustedCommunityMembers().includes(review.user?.login ?? '')
Expand Down
2 changes: 1 addition & 1 deletion tools/@aws-cdk/prlint/test/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ describe('integration tests required on features', () => {
mockListReviews.mockImplementation(() => {
return {
data: [
{ id: 1111122223, user: { login: 'pahud' }, state: 'COMMENT' },
{ id: 1111122223, user: { login: 'pahud' }, state: 'COMMENTED' },
],
};
});
Expand Down

0 comments on commit 960d14a

Please sign in to comment.