damccorm commented on code in PR #22257:
URL: https://github.com/apache/beam/pull/22257#discussion_r922278726


##########
scripts/ci/pr-bot/processNewPrs.ts:
##########
@@ -39,34 +39,27 @@ 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 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" ||
-        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, 5, 16, 14); // June 16 2022, 14:00 
UTC (note that Java months are 0 indexed)
+  const firstPythonPrToProcess = new Date(2022, 5, 16, 14); // June 16 2022, 
14:00 UTC (note that JavaScript months are 0 indexed)

Review Comment:
   Good question! We do need it though - if you look at 
https://github.com/apache/beam/blob/53c3ffb9d004030b772ef31d851e95757711ca5b/scripts/ci/pr-bot/processNewPrs.ts#L307-L313
 its called with [paginate](https://octokit.github.io/rest.js/v18#pagination) 
which automatically pulls _all_ the pages of results (using continuation 
tokens). So it does get all open pulls. Otherwise I would've just called the 
[octokit method for listing pulls 
directly](https://octokit.github.io/rest.js/v18#pulls-list) instead of using 
the rest API.
   
   Also, for posterity, this filter is so that the bot doesn't activate on 
pulls where reviews are already in progress



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to