cmd/gopherbot: don't autosubmit CLs with wait-release

If a CL has the "wait-release" hashtag set, don't autosubmit it, since
we are presumably in the freeze, and should wait for the tree to open.

Updates golang/go#48021
Updates golang/go#24836

Change-Id: I23258ccbb71d2b8febe97ad8883b9fe9f90c761d
Reviewed-on: https://go-review.googlesource.com/c/build/+/391734
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Trust: Roland Shoemaker <roland@golang.org>
Run-TryBot: Roland Shoemaker <roland@golang.org>
Auto-Submit: Roland Shoemaker <roland@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/cmd/gopherbot/gopherbot.go b/cmd/gopherbot/gopherbot.go
index 9a6b3fd..cdfc72a 100644
--- a/cmd/gopherbot/gopherbot.go
+++ b/cmd/gopherbot/gopherbot.go
@@ -2305,6 +2305,13 @@
 				return nil
 			}
 
+			// Skip this CL if it has the "wait-release" hashtag set.
+			for _, ht := range changeInfo.Hashtags {
+				if ht == "wait-release" {
+					return nil
+				}
+			}
+
 			// Skip this CL if there are any unresolved comment threads.
 			comments, err := b.gerrit.ListChangeComments(ctx, fmt.Sprint(cl.Number))
 			if err != nil {