Skip to content
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

chore(prlint): rename pr/needs-review to pr/needs-community-review #26455

Merged
merged 2 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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