Skip to content

Commit 0582679

Browse files
committed
fix: rename ready-to-merge to status: ready-to-merge
Addresses maintainer feedback to match the original MVP proposal naming convention. Also updates the label description to accurately reflect the new logic requirement of '1+ maintainer and 2+ total approvals' instead of the old description. Signed-off-by: darshit2308 <darshit2308@gmail.com>
1 parent 84a35d4 commit 0582679

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/scripts/review-sync/helpers/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@ const QUEUE_LABELS = {
3333
description: 'PR awaiting maintainer final review',
3434
},
3535
MERGE: {
36-
name: 'ready-to-merge',
36+
name: 'status: ready-to-merge',
3737
color: '0e8a16',
38-
description: 'PR approved by maintainer and ready to merge',
38+
description: 'PR has 1+ maintainer and 2+ total approvals, ready to merge',
3939
},
4040
};
4141

.github/scripts/review-sync/helpers/labels.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,14 @@ async function ensureLabel(github, owner, repo, label, dryRun) {
5757
* Determine the correct queue label for a PR based on approval counts.
5858
*
5959
* Phase 1 logic (4-stage pipeline):
60-
* maintainerApproval >= 1 AND anyApproval >= 2 → ready-to-merge (CODEOWNERS + min reviews)
60+
* maintainerApproval >= 1 AND anyApproval >= 2 → status: ready-to-merge (CODEOWNERS + min reviews)
6161
* writeApproval >= 1 OR maintainerApproval >= 1 → queue:maintainers (senior review present, needs more)
6262
* anyApproval >= 1 → queue:committers (has any approval, needs committer)
6363
* else → queue:junior-committer (no approvals yet)
6464
*
65-
* Note: ready-to-merge requires BOTH a maintainer approval AND at least 2
65+
* Note: status: ready-to-merge requires BOTH a maintainer approval AND at least 2
6666
* total reviews. This prevents a single maintainer approval from marking
67-
* a PR as ready-to-merge when branch protection requires 2+ reviews.
67+
* a PR as status: ready-to-merge when branch protection requires 2+ reviews.
6868
*
6969
* @param {{ maintainerApproval: number, writeApproval: number, softApproval: number, anyApproval: number }} approvals
7070
* @returns {object} The correct QUEUE_LABELS entry

.github/scripts/review-sync/tests/test-labels.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,32 @@ const unitTests = [
3232
},
3333
},
3434
{
35-
name: 'determineLabel: 2 write + 0 maintainer → queue:maintainers (NOT ready-to-merge)',
35+
name: 'determineLabel: 2 write + 0 maintainer → queue:maintainers (NOT status: ready-to-merge)',
3636
test: () => {
3737
const r = determineLabel({ maintainerApproval: 0, writeApproval: 2, softApproval: 0, anyApproval: 2 });
3838
return r.name === 'queue:maintainers';
3939
},
4040
},
4141
{
42-
name: 'determineLabel: 1 maintainer alone → queue:maintainers (NOT ready-to-merge, needs 2 reviews)',
42+
name: 'determineLabel: 1 maintainer alone → queue:maintainers (NOT status: ready-to-merge, needs 2 reviews)',
4343
test: () => {
4444
// Sophie's edge case: maintainer approves first, only 1 total review
4545
const r = determineLabel({ maintainerApproval: 1, writeApproval: 0, softApproval: 0, anyApproval: 1 });
4646
return r.name === 'queue:maintainers';
4747
},
4848
},
4949
{
50-
name: 'determineLabel: 1 maintainer + 1 write → ready-to-merge (2 reviews satisfied)',
50+
name: 'determineLabel: 1 maintainer + 1 write → status: ready-to-merge (2 reviews satisfied)',
5151
test: () => {
5252
const r = determineLabel({ maintainerApproval: 1, writeApproval: 1, softApproval: 0, anyApproval: 2 });
53-
return r.name === 'ready-to-merge';
53+
return r.name === 'status: ready-to-merge';
5454
},
5555
},
5656
{
57-
name: 'determineLabel: 1 maintainer + 1 soft → ready-to-merge (2 reviews satisfied)',
57+
name: 'determineLabel: 1 maintainer + 1 soft → status: ready-to-merge (2 reviews satisfied)',
5858
test: () => {
5959
const r = determineLabel({ maintainerApproval: 1, writeApproval: 0, softApproval: 1, anyApproval: 2 });
60-
return r.name === 'ready-to-merge';
60+
return r.name === 'status: ready-to-merge';
6161
},
6262
},
6363
{
@@ -121,7 +121,7 @@ const unitTests = [
121121
],
122122
});
123123
const changed = await syncLabel(mock, 'o', 'r', { number: 1, labels: [{ name: 'queue:junior-committer' }] }, false);
124-
return changed === true && mock.calls.labelsAdded.includes('ready-to-merge') && mock.calls.labelsRemoved.includes('queue:junior-committer');
124+
return changed === true && mock.calls.labelsAdded.includes('status: ready-to-merge') && mock.calls.labelsRemoved.includes('queue:junior-committer');
125125
},
126126
},
127127
{

0 commit comments

Comments
 (0)