You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by lo...@apache.org on 2022/04/14 15:46:36 UTC
[beam] branch master updated: [BEAM-13925] Dont double assign committers if author or other reviewer is a committer (#17364)
This is an automated email from the ASF dual-hosted git repository.
lostluck 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 95a775975a5 [BEAM-13925] Dont double assign committers if author or other reviewer is a committer (#17364)
95a775975a5 is described below
commit 95a775975a586d83b7cbcaeecef28ab7da463a9c
Author: Danny McCormick <da...@google.com>
AuthorDate: Thu Apr 14 11:46:28 2022 -0400
[BEAM-13925] Dont double assign committers if author or other reviewer is a committer (#17364)
---
scripts/ci/pr-bot/processNewPrs.ts | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/scripts/ci/pr-bot/processNewPrs.ts b/scripts/ci/pr-bot/processNewPrs.ts
index d3d0b2d5524..6b112c3dbb1 100644
--- a/scripts/ci/pr-bot/processNewPrs.ts
+++ b/scripts/ci/pr-bot/processNewPrs.ts
@@ -195,6 +195,20 @@ async function processPull(
for (const approver of approvers) {
const labelOfReviewer = prState.getLabelForReviewer(approver);
if (labelOfReviewer) {
+ if (
+ (await github.checkIfCommitter(pull.user.login)) ||
+ (await prState.isAnyAssignedReviewerCommitter()) ||
+ (await github.checkIfCommitter(approver))
+ ) {
+ console.log(
+ "Author or reviewer is committer, not forwarding to another committer"
+ );
+ // Cache this result so we don't need to keep looking it up.
+ prState.committerAssigned = true;
+ await stateClient.writePrState(pull.number, prState);
+ return;
+ }
+
console.log(`Assigning a committer for label ${labelOfReviewer}`);
let reviewersState = await stateClient.getReviewersForLabelState(
labelOfReviewer