Skip to content

Commit 3148f54

Browse files
committed
reverted the test codes, and some minor fixes
1 parent 4e9513c commit 3148f54

4 files changed

Lines changed: 15 additions & 9 deletions

File tree

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

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,19 @@ async function hasCIFailures(github, owner, repo, sha) {
8080
/**
8181
* Determine the correct queue label for a PR based on approval counts.
8282
*
83-
* Phase 1 logic (4-stage pipeline):
84-
* maintainerApprovals >= 1 AND coreApprovals >= 2 → status: ready-to-merge (CODEOWNERS + min core reviews)
85-
* coreApprovals >= 1 → queue:maintainers (senior review present, needs more)
86-
* anyApproval >= 1 → queue:committers (has any approval, needs committer)
83+
* Phase 1 logic (5-stage pipeline):
84+
* ciFailing → queue:junior-committer (CI broken, block promotion)
85+
* maintainerApprovals >= 1 AND coreApprovals >= 2 → status: ready-to-merge (CODEOWNERS + min core reviews)
86+
* maintainerApprovals >= 1 (but coreApprovals < 2) → queue:committers (maintainer already in, need committer next)
87+
* coreApprovals >= 1 (no maintainer yet) → queue:maintainers (committer reviewed, needs maintainer)
88+
* anyApproval >= 1 → queue:committers (has soft approval, needs committer)
8789
* else → queue:junior-committer (no approvals yet)
8890
*
89-
* Note: status: ready-to-merge requires BOTH a maintainer approval AND at least 2
91+
* Note: When a maintainer "jumps in early" before triage/committers, the PR should
92+
* route to queue:committers (not queue:maintainers) to attract a committer review
93+
* rather than a second maintainer. This prevents wasting maintainer bandwidth.
94+
*
95+
* status: ready-to-merge requires BOTH a maintainer approval AND at least 2
9096
* total core reviews (maintainer or committer). This prevents a single maintainer approval
9197
* + a soft approval from marking a PR as ready when branch protection requires 2+ core reviews.
9298
*

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const unitTests = [
3939
},
4040
},
4141
{
42-
name: 'determineLabel: 1 maintainer alone → queue:committers (maintainer reviewed, needs 1 core)',
42+
name: 'determineLabel: 1 maintainer alone → queue:committers (maintainer reviewed, needs committer next)',
4343
test: () => {
4444
// Sophie's edge case: maintainer approves first, only 1 total review
4545
// Note: maintainer counts as both maintainer and core
@@ -56,7 +56,7 @@ const unitTests = [
5656
},
5757
},
5858
{
59-
name: 'determineLabel: 1 maintainer + 1 soft → queue:committers (soft does not count as core, needs 1 core)',
59+
name: 'determineLabel: 1 maintainer + 1 soft → queue:committers (soft does not count as core, needs committer)',
6060
test: () => {
6161
const r = determineLabel({ maintainerApprovals: 1, coreApprovals: 1, softApprovals: 1, anyApproval: 2 });
6262
return r.name === 'queue:committers';

.github/workflows/review-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ concurrency:
3434

3535
jobs:
3636
sync:
37-
runs-on: ubuntu-latest
37+
runs-on: hl-sdk-py-lin-md
3838
env:
3939
DRY_RUN: ${{ inputs.dry_run || 'false' }}
4040

.github/workflows/test-review-sync.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ on:
1212

1313
jobs:
1414
test:
15-
runs-on: ubuntu-latest
15+
runs-on: hl-sdk-py-lin-md
1616
permissions:
1717
contents: read
1818
steps:

0 commit comments

Comments
 (0)