Skip to content

Commit

Permalink
chore(prlint): rename pr/needs-review to pr/needs-community-review (#…
Browse files Browse the repository at this point in the history
…26455)

Makes it less confusing

----

*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 20, 2023
1 parent 3e47d1b commit 5c09893
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
8 changes: 4 additions & 4 deletions tools/@aws-cdk/prlint/lint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
}
}
Expand Down
30 changes: 15 additions & 15 deletions tools/@aws-cdk/prlint/test/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
});
Expand Down Expand Up @@ -577,7 +577,7 @@ describe('integration tests required on features', () => {
});
(pr as any).labels = [
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand All @@ -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",
});
Expand Down Expand Up @@ -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",
});
Expand All @@ -645,7 +645,7 @@ describe('integration tests required on features', () => {
name: 'pr-linter/exemption-requested',
},
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
},
];

Expand All @@ -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",
});
Expand All @@ -678,7 +678,7 @@ describe('integration tests required on features', () => {
});
(pr as any).labels = [
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand All @@ -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",
});
Expand All @@ -711,7 +711,7 @@ describe('integration tests required on features', () => {
});
(pr as any).labels = [
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand All @@ -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",
});
Expand All @@ -749,7 +749,7 @@ describe('integration tests required on features', () => {
});
(pr as any).labels = [
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand All @@ -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",
});
Expand All @@ -782,7 +782,7 @@ describe('integration tests required on features', () => {
});
(pr as any).labels = [
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand Down Expand Up @@ -815,7 +815,7 @@ describe('integration tests required on features', () => {
name: 'pr-linter/exemption-requested',
},
{
name: 'pr/needs-review',
name: 'pr/needs-community-review',
}
];

Expand All @@ -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",
});
Expand Down

0 comments on commit 5c09893

Please sign in to comment.