aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--git-codereview/doc.go3
-rw-r--r--git-codereview/mail.go20
2 files changed, 21 insertions, 2 deletions
diff --git a/git-codereview/doc.go b/git-codereview/doc.go
index 4be0c0d..0754479 100644
--- a/git-codereview/doc.go
+++ b/git-codereview/doc.go
@@ -256,6 +256,9 @@ is needed is when checking in test cases for cryptography libraries.)
The -trybot flag sets a Run-TryBot+1 vote on any uploaded changes.
The Go project uses this vote to start running integration tests on the CL.
+During the transition between two CI systems, the environment variable
+GIT_CODEREVIEW_TRYBOT can be set to one of "luci", "farmer", or "both"
+to explicitly override where the -trybot flag starts integration tests.
The -autosubmit flag sets a Auto-Submit+1 vote on any uploaded changes.
diff --git a/git-codereview/mail.go b/git-codereview/mail.go
index 5d385f9..4bcd85c 100644
--- a/git-codereview/mail.go
+++ b/git-codereview/mail.go
@@ -6,6 +6,7 @@ package main
import (
"fmt"
+ "os"
"regexp"
"sort"
"strings"
@@ -47,6 +48,19 @@ func cmdMail(args []string) {
exit(2)
}
+ var trybotVotes []string
+ switch os.Getenv("GIT_CODEREVIEW_TRYBOT") {
+ case "luci":
+ trybotVotes = []string{"Commit-Queue+1"}
+ case "", "farmer":
+ trybotVotes = []string{"Run-TryBot"}
+ case "both":
+ trybotVotes = []string{"Commit-Queue+1", "Run-TryBot"}
+ default:
+ fmt.Fprintf(stderr(), "GIT_CODEREVIEW_TRYBOT must be unset, blank, or one of 'luci', 'farmer', or 'both'\n")
+ exit(2)
+ }
+
b := CurrentBranch()
var c *Commit
@@ -142,8 +156,10 @@ func cmdMail(args []string) {
start = ","
}
if *trybot {
- refSpec += start + "l=Run-TryBot"
- start = ","
+ for _, v := range trybotVotes {
+ refSpec += start + "l=" + v
+ start = ","
+ }
}
if *wip {
refSpec += start + "wip"