diff options
| author | Austin Clements <austin@google.com> | 2015-11-19 11:32:48 -0500 |
|---|---|---|
| committer | Austin Clements <austin@google.com> | 2015-11-19 18:38:35 +0000 |
| commit | 143352e9df416ac808f2bb75e8fd1cea5a038c5d (patch) | |
| tree | 8c85f53d0c3d92a9d56c65da76d3b11d792b667e /git-codereview/mail.go | |
| parent | 7cc8d7720ed2e3ca6aba0cea191b9e19690dc9f7 (diff) | |
| download | go-x-review-143352e9df416ac808f2bb75e8fd1cea5a038c5d.tar.xz | |
git-codereview: add mail -trybot flag
This flag sets the Run-TryBot+1 label when uploading a CL.
Change-Id: I46d14733e0d23c8f40198b0bf670c266ef05db16
Reviewed-on: https://go-review.googlesource.com/17053
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Diffstat (limited to 'git-codereview/mail.go')
| -rw-r--r-- | git-codereview/mail.go | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/git-codereview/mail.go b/git-codereview/mail.go index 4a2b973..0354836 100644 --- a/git-codereview/mail.go +++ b/git-codereview/mail.go @@ -17,6 +17,7 @@ func cmdMail(args []string) { diff = flags.Bool("diff", false, "show change commit diff and don't upload or mail") force = flags.Bool("f", false, "mail even if there are staged changes") topic = flags.String("topic", "", "set Gerrit topic") + trybot = flags.Bool("trybot", false, "run trybots on the uploaded CLs") rList = new(stringList) // installed below ccList = new(stringList) // installed below ) @@ -24,7 +25,7 @@ func cmdMail(args []string) { flags.Var(ccList, "cc", "comma-separated list of people to CC:") flags.Usage = func() { - fmt.Fprintf(stderr(), "Usage: %s mail %s [-r reviewer,...] [-cc mail,...] [-topic topic] [commit-hash]\n", os.Args[0], globalFlags) + fmt.Fprintf(stderr(), "Usage: %s mail %s [-r reviewer,...] [-cc mail,...] [-topic topic] [-trybot] [commit-hash]\n", os.Args[0], globalFlags) } flags.Parse(args) if len(flags.Args()) > 1 { @@ -72,6 +73,11 @@ func cmdMail(args []string) { dief("topic may not contain a comma") } refSpec += start + "topic=" + *topic + start = "," + } + if *trybot { + refSpec += start + "l=Run-TryBot" + start = "," } run("git", "push", "-q", "origin", refSpec) |
