about summary refs log tree commit diff
path: root/ops/besadii/main.go
diff options
context:
space:
mode:
authorÅsmund Østvold <asmundo@gmail.com>2022-06-09T12·36+0200
committerclbot <clbot@tvl.fyi>2022-06-09T15·26+0000
commit2caa50c9bd0f9fad3194c8c1c2653805b038bd0f (patch)
tree1ee100573cfc9ff85a909e670e11f096e0a05629 /ops/besadii/main.go
parent35c3759602c32b54234f31da12687aef85177225 (diff)
fix(ops/besadii) test trigger.ref against configured branch r/4232
Before this commit besadii only worked for repos having
'refs/heads/canon' as main branch.

Change-Id: Ia2ceb8a720c675be84bc3d81b89338522cea6ebd
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5862
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: asmundo <asmundo@gmail.com>
Diffstat (limited to 'ops/besadii/main.go')
-rw-r--r--ops/besadii/main.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/ops/besadii/main.go b/ops/besadii/main.go
index 412ae3a73bea..f850b536455c 100644
--- a/ops/besadii/main.go
+++ b/ops/besadii/main.go
@@ -459,7 +459,7 @@ func gerritHookMain(cfg *config, log *syslog.Writer, trigger *buildTrigger) {
 		log.Err(fmt.Sprintf("failed to trigger Buildkite build: %s", err))
 	}
 
-	if cfg.SourcegraphUrl != "" && trigger.ref == "refs/heads/canon" {
+	if cfg.SourcegraphUrl != "" && trigger.ref == cfg.Branch {
 		err = triggerIndexUpdate(cfg, log)
 		if err != nil {
 			log.Err(fmt.Sprintf("failed to trigger sourcegraph index update: %s", err))