aboutsummaryrefslogtreecommitdiff
path: root/git-codereview/mail.go
diff options
context:
space:
mode:
authorHeschi Kreinick <heschi@google.com>2022-09-16 11:17:40 -0400
committerGopher Robot <gobot@golang.org>2022-10-03 20:07:31 +0000
commita897dc9c03c577746ba0a4033dc61f3e5983f3e2 (patch)
tree22bd4f11fd34fd2fc317cba54ed3c402e0991924 /git-codereview/mail.go
parent0c548b8eec7a2541f601138b66789ae12dfbace1 (diff)
downloadgo-x-review-a897dc9c03c577746ba0a4033dc61f3e5983f3e2.tar.xz
git-codereview: add -autosubmitv1.1.0
Add a flag to set the Auto-Submit label. For golang/go#48021. Change-Id: If704e8b5e9e0e2521eed78fe28af10d3c31ec3a0 Reviewed-on: https://go-review.googlesource.com/c/review/+/431375 Auto-Submit: Heschi Kreinick <heschi@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Russ Cox <rsc@golang.org> Run-TryBot: Heschi Kreinick <heschi@google.com>
Diffstat (limited to 'git-codereview/mail.go')
-rw-r--r--git-codereview/mail.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/git-codereview/mail.go b/git-codereview/mail.go
index f8e6485..c9bb567 100644
--- a/git-codereview/mail.go
+++ b/git-codereview/mail.go
@@ -27,6 +27,7 @@ func cmdMail(args []string) {
trybot = flags.Bool("trybot", false, "run trybots on the uploaded CLs")
wip = flags.Bool("wip", false, "set the status of a change to Work-in-Progress")
noverify = flags.Bool("no-verify", false, "disable presubmits")
+ autoSubmit = flags.Bool("autosubmit", false, "set autosubmit on the uploaded CLs")
)
flags.Var(rList, "r", "comma-separated list of reviewers")
flags.Var(ccList, "cc", "comma-separated list of people to CC:")
@@ -35,8 +36,9 @@ func cmdMail(args []string) {
flags.Usage = func() {
fmt.Fprintf(stderr(),
"Usage: %s mail %s [-r reviewer,...] [-cc mail,...]\n"+
- "\t[-f] [-diff] [-hashtag tag,...] [-nokeycheck] [-topic topic]\n"+
- "\t[-trybot] [-wip] [commit]\n", progName, globalFlags)
+ "\t[-autosubmit] [-f] [-diff] [-hashtag tag,...]\n"+
+ "\t[-nokeycheck] [-topic topic] [-trybot] [-wip]\n"+
+ "\t[commit]\n", progName, globalFlags)
exit(2)
}
flags.Parse(args)
@@ -147,6 +149,9 @@ func cmdMail(args []string) {
refSpec += start + "wip"
start = ","
}
+ if *autoSubmit {
+ refSpec += start + "l=Auto-Submit"
+ }
args = []string{"push", "-q"}
if *noKeyCheck {
args = append(args, "-o", "nokeycheck")