cmd/gopherbot: avoid auto-assignment of CLs on shared branches
Don't auto-assign reviewers for CLs on shared branches such as
"dev.garbage" or "dev.ssa" -- the presumption is that folks working on
such branches will be familiar enough with development practices that
they can assign their own reviewers.
Change-Id: I196d73d76cb0c6e72dd30f52f9341febff311b7a
Reviewed-on: https://go-review.googlesource.com/c/build/+/196141
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
diff --git a/cmd/gopherbot/gopherbot.go b/cmd/gopherbot/gopherbot.go
index 3d05e3d..3033646 100644
--- a/cmd/gopherbot/gopherbot.go
+++ b/cmd/gopherbot/gopherbot.go
@@ -1723,6 +1723,14 @@
if cl.Private || cl.WorkInProgress() || time.Since(cl.Created) < 10*time.Minute {
return nil
}
+
+ // Don't auto-assign reviewers to CLs on shared branches;
+ // the presumption is that developers there will know which
+ // reviewers to assign.
+ if strings.HasPrefix(cl.Branch(), "dev.") {
+ return nil
+ }
+
tags := cl.Meta.Hashtags()
if tags.Contains(tagNoOwners) {
return nil