cmd/gopherbot: add opt-out from automatic reviewers
Updates golang/go#34362.
Change-Id: I2a1861d7ebb903d0231a7670597467b02d53ac96
Reviewed-on: https://go-review.googlesource.com/c/build/+/196138
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/gopherbot/gopherbot.go b/cmd/gopherbot/gopherbot.go
index 3033646..31a2c86 100644
--- a/cmd/gopherbot/gopherbot.go
+++ b/cmd/gopherbot/gopherbot.go
@@ -1709,6 +1709,12 @@
return false
}
+// assignReviewersOptOut lists contributors who have opted out from
+// having reviewers automatically added to their CLs.
+var assignReviewersOptOut = map[string]bool{
+ "mdempsky@google.com": true,
+}
+
// assignReviewersToCLs looks for CLs with no humans in the reviewer or cc fields
// that have been open for a short amount of time (enough of a signal that the
// author does not intend to add anyone to the review), then assigns reviewers/ccs
@@ -1723,6 +1729,9 @@
if cl.Private || cl.WorkInProgress() || time.Since(cl.Created) < 10*time.Minute {
return nil
}
+ if assignReviewersOptOut[cl.Owner().Email()] {
+ return nil
+ }
// Don't auto-assign reviewers to CLs on shared branches;
// the presumption is that developers there will know which