From eef292b71a1370b7eab61e0c2be1c3b610b82d78 Mon Sep 17 00:00:00 2001 From: Kaizen Conroy Date: Thu, 20 Jul 2023 14:47:28 -0400 Subject: [PATCH] chore(prlint): rename pr/needs-review to pr/needs-community-review --- tools/@aws-cdk/prlint/lint.ts | 8 +++---- tools/@aws-cdk/prlint/test/lint.test.ts | 30 ++++++++++++------------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/tools/@aws-cdk/prlint/lint.ts b/tools/@aws-cdk/prlint/lint.ts index 15b536f059221..ae68360d55f1e 100644 --- a/tools/@aws-cdk/prlint/lint.ts +++ b/tools/@aws-cdk/prlint/lint.ts @@ -336,7 +336,7 @@ export class PullRequestLinter { * * In addition, we differentiate between ready for review by a core team member * (pr/needs-maintainer-review) or ready for review by core OR the trusted community - * (pr/needs-review). A PR is prioritized for core team review when: + * (pr/needs-community-review). A PR is prioritized for core team review when: * * 6. It links to a p1 issue * 7. It links to a p2 issue and has an approved community review @@ -396,12 +396,12 @@ export class PullRequestLinter { if (readyForReview && (fixesP1 || communityApproved)) { this.addLabel('pr/needs-maintainer-review', pr); - this.removeLabel('pr/needs-review', pr); + this.removeLabel('pr/needs-community-review', pr); } else if (readyForReview && !fixesP1) { this.removeLabel('pr/needs-maintainer-review', pr); - this.addLabel('pr/needs-review', pr); + this.addLabel('pr/needs-community-review', pr); } else { - this.removeLabel('pr/needs-review', pr); + this.removeLabel('pr/needs-community-review', pr); this.removeLabel('pr/needs-maintainer-review', pr); } } diff --git a/tools/@aws-cdk/prlint/test/lint.test.ts b/tools/@aws-cdk/prlint/test/lint.test.ts index f25064404d769..efd09ad6ccd31 100644 --- a/tools/@aws-cdk/prlint/test/lint.test.ts +++ b/tools/@aws-cdk/prlint/test/lint.test.ts @@ -541,7 +541,7 @@ describe('integration tests required on features', () => { // THEN expect(mockAddLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "labels": ["pr/needs-review"], + "labels": ["pr/needs-community-review"], "owner": "aws", "repo": "aws-cdk", }); @@ -577,7 +577,7 @@ describe('integration tests required on features', () => { }); (pr as any).labels = [ { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -592,7 +592,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", }); @@ -623,7 +623,7 @@ describe('integration tests required on features', () => { // THEN expect(mockAddLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "labels": ["pr/needs-review"], + "labels": ["pr/needs-community-review"], "owner": "aws", "repo": "aws-cdk", }); @@ -645,7 +645,7 @@ describe('integration tests required on features', () => { name: 'pr-linter/exemption-requested', }, { - name: 'pr/needs-review', + name: 'pr/needs-community-review', }, ]; @@ -660,7 +660,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", }); @@ -678,7 +678,7 @@ describe('integration tests required on features', () => { }); (pr as any).labels = [ { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -693,7 +693,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", }); @@ -711,7 +711,7 @@ describe('integration tests required on features', () => { }); (pr as any).labels = [ { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -726,7 +726,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", }); @@ -749,7 +749,7 @@ describe('integration tests required on features', () => { }); (pr as any).labels = [ { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -764,7 +764,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", }); @@ -782,7 +782,7 @@ describe('integration tests required on features', () => { }); (pr as any).labels = [ { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -815,7 +815,7 @@ describe('integration tests required on features', () => { name: 'pr-linter/exemption-requested', }, { - name: 'pr/needs-review', + name: 'pr/needs-community-review', } ]; @@ -826,7 +826,7 @@ describe('integration tests required on features', () => { // THEN expect(mockRemoveLabel.mock.calls[0][0]).toEqual({ "issue_number": 1234, - "name": "pr/needs-review", + "name": "pr/needs-community-review", "owner": "aws", "repo": "aws-cdk", });