Skip to content

Commit efe44f1

Browse files
committed
Merge remote-tracking branch 'upstream/main' into revision-guard-draft-flow
2 parents 393f8e2 + ce16902 commit efe44f1

89 files changed

Lines changed: 2620 additions & 1388 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codacy.yml

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/scripts/package-lock.json

Lines changed: 159 additions & 171 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/scripts/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@
77
},
88
"devDependencies": {
99
"jest": "^29.7.0"
10+
},
11+
"overrides": {
12+
"js-yaml": "^4.2.0",
13+
"@babel/core": "^7.29.6"
1014
}
1115
}

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,11 @@ async function syncLabel(github, owner, repo, pr, dryRun) {
178178
(name) => ALL_QUEUE_LABEL_NAMES.includes(name) && name !== correctLabel.name
179179
);
180180

181-
const isHuman = pr.user && pr.user.type !== 'Bot';
182-
const needsCommunityReview = isHuman && !currentLabels.includes(COMMUNITY_REVIEW.name);
181+
const needsCommunityReview = !currentLabels.includes(COMMUNITY_REVIEW.name);
183182

184183
// Check if the correct labels are already present AND there are no stale labels to remove
185184
if (currentLabels.includes(correctLabel.name) && staleLabels.length === 0 && !needsCommunityReview) {
186-
console.log(` ✓ Already has "${correctLabel.name}"${isHuman ? ` and "${COMMUNITY_REVIEW.name}"` : ''}. No change needed.`);
185+
console.log(` ✓ Already has "${correctLabel.name}" and "${COMMUNITY_REVIEW.name}". No change needed.`);
187186
return false;
188187
}
189188

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ const unitTests = [
113113
name: 'syncLabel: already correct, no stale → returns false',
114114
test: async () => {
115115
const mock = createMockGithub({ roles: {}, reviews: [] });
116-
const changed = await syncLabel(mock, 'o', 'r', { number: 1, labels: [{ name: 'queue:junior-committer' }], head: { sha: '123' }, user: { type: 'Bot' } }, false);
116+
const changed = await syncLabel(mock, 'o', 'r', { number: 1, labels: [{ name: 'queue:junior-committer' }, { name: COMMUNITY_REVIEW.name }], head: { sha: '123' }, user: { type: 'Bot' } }, false);
117117
return changed === false && mock.calls.labelsAdded.length === 0;
118118
},
119119
},
@@ -152,13 +152,13 @@ const unitTests = [
152152
},
153153
},
154154
{
155-
name: 'syncLabel: bot PR does NOT receive community review label',
155+
name: 'syncLabel: bot PR receives community review label if missing',
156156
test: async () => {
157157
const mock = createMockGithub({ roles: {}, reviews: [] });
158158
const pr = { number: 1, labels: [{ name: 'queue:junior-committer' }], head: { sha: '123' }, user: { type: 'Bot' } };
159159
const changed = await syncLabel(mock, 'o', 'r', pr, false);
160-
// Already has junior-committer, and being a Bot means it shouldn't add community review
161-
return changed === false && mock.calls.labelsAdded.length === 0;
160+
// Already has junior-committer; missing COMMUNITY_REVIEW should be added for bot PRs too
161+
return changed === true && mock.calls.labelsAdded.includes(COMMUNITY_REVIEW.name);
162162
},
163163
},
164164
{

.github/workflows/bot-advanced-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
echo "::notice::Skipping: event=${{ github.event_name }}, action=${{ github.event.action }}, has_advanced_label=${{ contains(github.event.issue.labels.*.name, 'skill: advanced') }}"
5252
- name: Checkout scripts
5353
if: steps.should_run.outputs.value == 'true'
54-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
54+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
5555
with:
5656
sparse-checkout: |
5757
.github/scripts

.github/workflows/bot-assignment-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
egress-policy: audit
1818

1919
- name: Checkout repository
20-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
20+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2121

2222
- name: Check Assignment Count
2323
env:

.github/workflows/bot-beginner-assign-on-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
egress-policy: audit
2929

3030
- name: Checkout repository
31-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
31+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3232

3333
- name: Run Beginner /assign handler
3434
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9.0.0

.github/workflows/bot-coderabbit-plan-trigger.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
egress-policy: audit
2929

3030
- name: Checkout repository
31-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 #v6.0.3
31+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0
3232

3333
- name: Trigger CodeRabbit Plan
3434
env:

.github/workflows/bot-gfi-assign-on-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
egress-policy: audit
3030

3131
- name: Checkout repository
32-
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
32+
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
3333

3434
- name: Run GFI /assign handler
3535
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 #v9.0.0

0 commit comments

Comments
 (0)