From c796bd6698d355c537ffe8900902fc1a5f6cce71 Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 11 May 2026 11:12:08 -0700 Subject: [PATCH 1/5] fix: fix testing sheet workflow --- .github/workflows/weekly-excel-sheet.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/weekly-excel-sheet.yaml b/.github/workflows/weekly-excel-sheet.yaml index e564c64e498..b1d3c77a771 100644 --- a/.github/workflows/weekly-excel-sheet.yaml +++ b/.github/workflows/weekly-excel-sheet.yaml @@ -15,8 +15,8 @@ jobs: - uses: actions/setup-node@v6 with: node-version: '24' - cache: 'npm' - - run: npm ci + cache: 'yarn' + - run: yarn install --frozen-lockfile - name: Generate and post Excel testing sheet to Slack run: node scripts/sendWeeklyExcelSheet.mjs env: From 1781ef604452236b2eade90e16b1cea2c218b1f0 Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 11 May 2026 11:12:17 -0700 Subject: [PATCH 2/5] fix test off pr logic --- scripts/getCommitsForTesting.mjs | 59 ++++++++++++++++++++++++++++---- scripts/sendWeeklyExcelSheet.mjs | 1 - 2 files changed, 53 insertions(+), 7 deletions(-) diff --git a/scripts/getCommitsForTesting.mjs b/scripts/getCommitsForTesting.mjs index 7e67d70e4e6..603e2ced86a 100644 --- a/scripts/getCommitsForTesting.mjs +++ b/scripts/getCommitsForTesting.mjs @@ -43,7 +43,10 @@ async function writeTestingCSV() { } export async function generateData(startDate, endDate) { - let data = await listCommits(startDate, endDate); + let [data, openOffPRs] = await Promise.all([ + listCommits(startDate, endDate), + listOpenOffPRs() + ]); // First pass: extract PR numbers from commit messages let commitsWithPRs = []; @@ -63,7 +66,33 @@ export async function generateData(startDate, endDate) { let racPRs = []; let v3PRs = []; let otherPRs = []; - let offPRs = []; + + // Off PRs are currently open PRs with the 'test off PR' label + let offPRs = openOffPRs.map(pr => { + let labels = new Set(pr.labels.map(l => l.name)); + let matches = [...validLabels].filter(name => labels.has(name)); + + let component = ''; + if (matches.length > 0) { + if (matches.includes('documentation')) { + component = 'Docs' + } else { + component = matches.sort().join('/'); + } + } + + if (matches.length === 0) { + component = removePRNumber(pr.title); + } + + let testInstructions = extractTestInstructions(pr.body); + return [ + component, + testInstructions.length > 300 ? 'See PR for testing instructions' : testInstructions, + pr.html_url, + removePRNumber(pr.title) + ]; + }); for (let i = 0; i < commitsWithPRs.length; i++) { let {title, num} = commitsWithPRs[i]; @@ -102,12 +131,9 @@ export async function generateData(startDate, endDate) { if ( !labels.has('S2') && !labels.has('RAC') && - !labels.has('v3') && - !labels.has('test off PR') + !labels.has('v3') ) { otherPRs.push(row); - } else if (labels.has('test off PR')) { - offPRs.push(row); } else { if (labels.has('S2')) { s2PRs.push(row); @@ -153,6 +179,26 @@ export async function generateCSV(startDate, endDate) { return {csv, counts}; } +async function listOpenOffPRs() { + let allPRs = []; + let page = 1; + let lastPageSize; + do { + let res = await octokit.issues.listForRepo({ + owner: 'adobe', + repo: 'react-spectrum', + state: 'open', + labels: 'test off PR', + per_page: 100, + page + }); + allPRs.push(...res.data.filter(issue => issue.pull_request)); + lastPageSize = res.data.length; + page++; + } while (lastPageSize === 100); + return allPRs; +} + async function listCommits(startDate, endDate) { let start = new Date(startDate); let end = new Date(endDate + 'T23:59:59.999Z'); @@ -300,6 +346,7 @@ let validLabels = new Set([ 'IllustratedMessage', 'Image', 'InlineAlert', + 'LabeledValue', 'Link', 'LinkButton', 'ListBox', diff --git a/scripts/sendWeeklyExcelSheet.mjs b/scripts/sendWeeklyExcelSheet.mjs index ccc35172f75..9aabee657ed 100644 --- a/scripts/sendWeeklyExcelSheet.mjs +++ b/scripts/sendWeeklyExcelSheet.mjs @@ -13,7 +13,6 @@ if (!SLACK_TESTING_BOT_TOKEN || !SLACK_CHANNEL_ID) { function getPreviousWeekRange() { let today = new Date(); let endDate = new Date(today); - endDate.setDate(today.getDate() - 1); let startDate = new Date(today); startDate.setDate(today.getDate() - 7); From 1f06fc92bd1092529c38b5cb2d18476e9ca4d1d3 Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 11 May 2026 11:12:45 -0700 Subject: [PATCH 3/5] formatting --- scripts/getCommitsForTesting.mjs | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/scripts/getCommitsForTesting.mjs b/scripts/getCommitsForTesting.mjs index 603e2ced86a..16486faaeeb 100644 --- a/scripts/getCommitsForTesting.mjs +++ b/scripts/getCommitsForTesting.mjs @@ -43,10 +43,7 @@ async function writeTestingCSV() { } export async function generateData(startDate, endDate) { - let [data, openOffPRs] = await Promise.all([ - listCommits(startDate, endDate), - listOpenOffPRs() - ]); + let [data, openOffPRs] = await Promise.all([listCommits(startDate, endDate), listOpenOffPRs()]); // First pass: extract PR numbers from commit messages let commitsWithPRs = []; @@ -75,7 +72,7 @@ export async function generateData(startDate, endDate) { let component = ''; if (matches.length > 0) { if (matches.includes('documentation')) { - component = 'Docs' + component = 'Docs'; } else { component = matches.sort().join('/'); } @@ -128,11 +125,7 @@ export async function generateData(startDate, endDate) { row.push(info.data.html_url); row.push(removePRNumber(title)); - if ( - !labels.has('S2') && - !labels.has('RAC') && - !labels.has('v3') - ) { + if (!labels.has('S2') && !labels.has('RAC') && !labels.has('v3')) { otherPRs.push(row); } else { if (labels.has('S2')) { From 675d6eea65227ee0696d4dd970cddaaff0130c3d Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 11 May 2026 15:39:54 -0700 Subject: [PATCH 4/5] skip labeling when many files are modified --- .github/labeler.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/labeler.yml b/.github/labeler.yml index 2ee0b684f5f..d51aeb88fb2 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,3 +1,5 @@ +max-files-changed: 101 + needs translations: - changed-files: - any-glob-to-any-file: ['**/intl/*.json'] From 364c13e61a6722583b1d5ddd56abcefa6fe6b78b Mon Sep 17 00:00:00 2001 From: Yihui Liao <44729383+yihuiliao@users.noreply.github.com> Date: Mon, 11 May 2026 15:40:51 -0700 Subject: [PATCH 5/5] idk i like 100 better --- .github/labeler.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/labeler.yml b/.github/labeler.yml index d51aeb88fb2..7f780b9102c 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,4 +1,4 @@ -max-files-changed: 101 +max-files-changed: 100 needs translations: - changed-files: