This is an automated email from the ASF dual-hosted git repository.
tvalentyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new 2e3d5e596da Expand pr bot to python (#21791)
2e3d5e596da is described below
commit 2e3d5e596da6227f5e6e421f5b1ff18dec253082
Author: Danny McCormick <[email protected]>
AuthorDate: Fri Jun 17 09:48:01 2022 -0400
Expand pr bot to python (#21791)
* Expand pr bot to python
* Push reviewer changes
* Limit to Python WG + Brian
* Add Pablo
* Add Yichi
* Set start date and format
* Feedback
---
.github/REVIEWERS.yml | 10 ++++++++++
scripts/ci/pr-bot/processNewPrs.ts | 19 ++++++++++++++-----
scripts/ci/pr-bot/processPrUpdate.ts | 10 ++++++++--
3 files changed, 32 insertions(+), 7 deletions(-)
diff --git a/.github/REVIEWERS.yml b/.github/REVIEWERS.yml
index 77d39975abc..a86ca5658c2 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 02b07e3e6e3..8c886cb5296 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 9cb6fcb150e..dfe3a26adb2 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;
}