From a12845238f46b5720652d22f05a1d62b39367176 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 10 Jun 2022 10:52:56 -0400 Subject: [PATCH 1/7] Expand pr bot to python --- scripts/ci/pr-bot/processNewPrs.ts | 4 ++-- scripts/ci/pr-bot/processPrUpdate.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts index 6b112c3dbb1f..b6560faaca5a 100644 --- a/scripts/ci/pr-bot/processNewPrs.ts +++ b/scripts/ci/pr-bot/processNewPrs.ts @@ -45,9 +45,9 @@ import { CheckStatus } from "./shared/checks"; * (in which case that's all we need to do). */ function needsProcessed(pull: any, prState: typeof Pr): boolean { - if (!pull.labels.find((label) => label.name.toLowerCase() === "go")) { + if (!pull.labels.find((label) => label.name.toLowerCase() === "go" || label.name.toLowerCase() == "python")) { console.log( - `Skipping PR ${pull.number} because it doesn't contain the go label` + `Skipping PR ${pull.number} because it doesn't contain the go or python labels` ); return false; } diff --git a/scripts/ci/pr-bot/processPrUpdate.ts b/scripts/ci/pr-bot/processPrUpdate.ts index 9cb6fcb150e3..2cf52a4eb041 100644 --- a/scripts/ci/pr-bot/processPrUpdate.ts +++ b/scripts/ci/pr-bot/processPrUpdate.ts @@ -136,8 +136,8 @@ async function processPrUpdate() { // TODO(damccorm) - remove this when we roll out to more than go const existingLabels = payload.issue?.labels || payload.pull_request?.labels; - if (!existingLabels.find((label) => label.name.toLowerCase() === "go")) { - console.log("Does not contain the go label - skipping"); + if (!existingLabels.find((label) => label.name.toLowerCase() === "go" || label.name.toLowerCase() === "python")) { + console.log("Does not contain the go or python labels - skipping"); return; } From 81d5fdf52676a7a63163ef44920a7cf55d973a96 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Fri, 10 Jun 2022 11:05:29 -0400 Subject: [PATCH 2/7] Push reviewer changes --- .github/REVIEWERS.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml index 77d39975abc7..09cd2f82ca9b 100644 --- a/.github/REVIEWERS.yml +++ b/.github/REVIEWERS.yml @@ -26,4 +26,13 @@ labels: - youngoli - riteshghorse exclusionList: [] + - name: Python + reviewers: + - AnandInguva + - yeandy + - Abacn + - TheNeuralBit + - ryanthompson591 + - tvalentyn + exclusionList: [] fallbackReviewers: [] From 4f30a003ee3e5c61982048a4474e0b9184600ab6 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Mon, 13 Jun 2022 09:57:09 -0400 Subject: [PATCH 3/7] Limit to Python WG + Brian --- .github/REVIEWERS.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml index 09cd2f82ca9b..3665a974275a 100644 --- a/.github/REVIEWERS.yml +++ b/.github/REVIEWERS.yml @@ -30,7 +30,6 @@ labels: reviewers: - AnandInguva - yeandy - - Abacn - TheNeuralBit - ryanthompson591 - tvalentyn From ed0cb2e503296c95844d98a8102dccbe597d748f Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Tue, 14 Jun 2022 08:34:17 -0400 Subject: [PATCH 4/7] Add Pablo --- .github/REVIEWERS.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml index 3665a974275a..186544378ed4 100644 --- a/.github/REVIEWERS.yml +++ b/.github/REVIEWERS.yml @@ -33,5 +33,6 @@ labels: - TheNeuralBit - ryanthompson591 - tvalentyn + - pabloem exclusionList: [] fallbackReviewers: [] From 34e5a31eb6344393d76baa05bc411f58b7ddcef0 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Wed, 15 Jun 2022 15:01:21 -0400 Subject: [PATCH 5/7] Add Yichi --- .github/REVIEWERS.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml index 186544378ed4..a86ca5658c22 100644 --- a/.github/REVIEWERS.yml +++ b/.github/REVIEWERS.yml @@ -34,5 +34,6 @@ labels: - ryanthompson591 - tvalentyn - pabloem + - y1chi exclusionList: [] fallbackReviewers: [] From 7c528ef034d900e255e0f376f05e59273b590bcf Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 16 Jun 2022 08:27:42 -0400 Subject: [PATCH 6/7] Set start date and format --- scripts/ci/pr-bot/processNewPrs.ts | 15 ++++++++++++--- scripts/ci/pr-bot/processPrUpdate.ts | 8 +++++++- 2 files changed, 19 insertions(+), 4 deletions(-) diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts index b6560faaca5a..7baf77bae6b8 100644 --- a/scripts/ci/pr-bot/processNewPrs.ts +++ b/scripts/ci/pr-bot/processNewPrs.ts @@ -45,15 +45,24 @@ import { CheckStatus } from "./shared/checks"; * (in which case that's all we need to do). */ function needsProcessed(pull: any, prState: typeof Pr): boolean { - if (!pull.labels.find((label) => label.name.toLowerCase() === "go" || label.name.toLowerCase() == "python")) { + if ( + !pull.labels.find( + (label) => + label.name.toLowerCase() === "go" || + label.name.toLowerCase() == "python" + ) + ) { console.log( `Skipping PR ${pull.number} because it doesn't contain the go or python labels` ); return false; } - const firstPrToProcess = new Date(2022, 2, 2, 20); + const firstPrToProcess = new Date(2022, 7, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed) const createdAt = new Date(pull.created_at); - if (createdAt < firstPrToProcess) { + if ( + createdAt < firstPrToProcess && + !pull.labels.find((label) => label.name.toLowerCase() === "go") + ) { console.log( `Skipping PR ${pull.number} because it was created at ${createdAt}, before the first pr to process date of ${firstPrToProcess}` ); diff --git a/scripts/ci/pr-bot/processPrUpdate.ts b/scripts/ci/pr-bot/processPrUpdate.ts index 2cf52a4eb041..dfe3a26adb26 100644 --- a/scripts/ci/pr-bot/processPrUpdate.ts +++ b/scripts/ci/pr-bot/processPrUpdate.ts @@ -136,7 +136,13 @@ async function processPrUpdate() { // TODO(damccorm) - remove this when we roll out to more than go const existingLabels = payload.issue?.labels || payload.pull_request?.labels; - if (!existingLabels.find((label) => label.name.toLowerCase() === "go" || label.name.toLowerCase() === "python")) { + if ( + !existingLabels.find( + (label) => + label.name.toLowerCase() === "go" || + label.name.toLowerCase() === "python" + ) + ) { console.log("Does not contain the go or python labels - skipping"); return; } From 57aa3ab9081582040fb0d83b9fec4d5dc0571e95 Mon Sep 17 00:00:00 2001 From: Danny McCormick Date: Thu, 16 Jun 2022 09:36:28 -0400 Subject: [PATCH 7/7] Feedback --- scripts/ci/pr-bot/processNewPrs.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts index 7baf77bae6b8..b4457bb3ec2d 100644 --- a/scripts/ci/pr-bot/processNewPrs.ts +++ b/scripts/ci/pr-bot/processNewPrs.ts @@ -39,7 +39,7 @@ import { CheckStatus } from "./shared/checks"; * 4) Are closed * 5) Have already been processed * 6) Have notifications stopped - * 7) The pr doesn't contain the go label (temporary). TODO(damccorm) - remove this when we're ready to roll this out to everyone. + * 7) The pr doesn't contain the go or python labels (temporary). TODO(damccorm) - remove this when we're ready to roll this out to everyone. * 8) The pr happens after the date we turn on the automation. TODO(damccorm) - remove this once this has been rolled out for a while. * unless we're supposed to remind the user after tests pass * (in which case that's all we need to do). @@ -49,7 +49,7 @@ function needsProcessed(pull: any, prState: typeof Pr): boolean { !pull.labels.find( (label) => label.name.toLowerCase() === "go" || - label.name.toLowerCase() == "python" + label.name.toLowerCase() === "python" ) ) { console.log( @@ -57,7 +57,7 @@ function needsProcessed(pull: any, prState: typeof Pr): boolean { ); return false; } - const firstPrToProcess = new Date(2022, 7, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed) + const firstPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 14:00 UTC (note that Java months are 0 indexed) const createdAt = new Date(pull.created_at); if ( createdAt < firstPrToProcess &&