gerrit: Use a Gerrit label instead of hashtag for autosubmit

This moves to using a Gerrit label ('Autosubmit') with boolean values
for determining whether a developer wants to have a change
automatically submitted.

See also https://cl.tvl.fyi/c/depot/+/4172
This commit is contained in:
Vincent Ambo 2021-12-09 13:49:16 +03:00
parent c67b3ba7ea
commit 24f5a642af
5 changed files with 17 additions and 44 deletions

11
main.go
View file

@ -21,7 +21,7 @@ import (
)
func main() {
var URL, username, password, projectName, branchName, submitQueueTag string
var URL, username, password, projectName, branchName string
var fetchOnly bool
var triggerInterval int
@ -64,13 +64,6 @@ func main() {
Destination: &branchName,
Value: "master",
},
cli.StringFlag{
Name: "submit-queue-tag",
Usage: "the tag used to submit something to the submit queue",
EnvVar: "SUBMIT_QUEUE_TAG",
Destination: &submitQueueTag,
Value: "submit_me",
},
cli.IntFlag{
Name: "trigger-interval",
Usage: "How often we should trigger ourselves (interval in seconds)",
@ -102,7 +95,7 @@ func main() {
}
log.Infof("Successfully connected to gerrit at %s", URL)
runner := submitqueue.NewRunner(l, gerrit, submitQueueTag)
runner := submitqueue.NewRunner(l, gerrit)
handler := frontend.MakeFrontend(rotatingLogHandler, gerrit, runner)