You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/03/10 01:21:11 UTC

[GitHub] [beam] damccorm commented on a change in pull request #17062: [BEAM-13925] Assign committers in the scheduled action

damccorm commented on a change in pull request #17062:
URL: https://github.com/apache/beam/pull/17062#discussion_r823252162



##########
File path: scripts/ci/pr-bot/processNewPrs.ts
##########
@@ -163,6 +172,59 @@ async function processPull(
 
   console.log(`Processing PR ${pull.number}`);
 
+  // If reviewers are already assigned, we just need to check if we should assign a committer.
+  if (Object.keys(prState.reviewersAssignedForLabels).length > 0) {
+    if (prState.committerAssigned) {
+      console.log(
+        `Skipping PR ${pull.number} because a committer has been assigned`
+      );
+      return;
+    }
+
+    const approvers = await approvedBy(pull);
+    if (!approvers || approvers.length == 0) {
+      console.log(
+        `Skipping PR ${pull.number} because reviewers are assigned but haven't approved`
+      );
+      return;
+    }
+
+    // TODO(BEAM-13925) - also check if the author is a committer, if they are don't auto-assign a committer
+    for (const approver of approvers) {

Review comment:
       Note that the below block of code was moved from processPrUpdate




-- 
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: github-unsubscribe@beam.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org