fix(ops/besadii) test trigger.ref against configured branch
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>
This commit is contained in:
parent
35c3759602
commit
2caa50c9bd
1 changed files with 1 additions and 1 deletions
|
@ -459,7 +459,7 @@ func gerritHookMain(cfg *config, log *syslog.Writer, trigger *buildTrigger) {
|
||||||
log.Err(fmt.Sprintf("failed to trigger Buildkite build: %s", err))
|
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)
|
err = triggerIndexUpdate(cfg, log)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Err(fmt.Sprintf("failed to trigger sourcegraph index update: %s", err))
|
log.Err(fmt.Sprintf("failed to trigger sourcegraph index update: %s", err))
|
||||||
|
|
Loading…
Reference in a new issue