diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml index 77d39975abc7..a86ca5658c22 100644 --- a/.github/REVIEWERS.yml +++ b/.github/REVIEWERS.yml @@ -26,4 +26,14 @@ labels: - youngoli - riteshghorse exclusionList: [] + - name: Python + reviewers: + - AnandInguva + - yeandy + - TheNeuralBit + - ryanthompson591 + - tvalentyn + - pabloem + - y1chi + exclusionList: [] fallbackReviewers: [] diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts index 6b112c3dbb1f..b4457bb3ec2d 100644 --- a/scripts/ci/pr-bot/processNewPrs.ts +++ b/scripts/ci/pr-bot/processNewPrs.ts @@ -39,21 +39,30 @@ 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). */ 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; } - const firstPrToProcess = new Date(2022, 2, 2, 20); + 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) { + 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 9cb6fcb150e3..dfe3a26adb26 100644 --- a/scripts/ci/pr-bot/processPrUpdate.ts +++ b/scripts/ci/pr-bot/processPrUpdate.ts @@ -136,8 +136,14 @@ 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; }