fix(besadii): Do not pass on update values for meta refs
Before this change, besadii would skip further processing of meta refs (which happen for every CL metadata change), but it would still schedule a build by returning an update - which would then inevitably fail. This change makes besadii skip meta refs the same way it skips non-depot builds, i.e. completely. Move *on* from meta refs, do *not* collect $100. Change-Id: I269d2299f4d3cb1f9c041da8c92fa00ae7794b38 Reviewed-on: https://cl.tvl.fyi/c/depot/+/825 Reviewed-by: eta <eta@theta.eu.org> Reviewed-by: BuildkiteCI Tested-by: BuildkiteCI
This commit is contained in:
parent
c0f07e142e
commit
03076c3977
1 changed files with 2 additions and 2 deletions
|
@ -154,12 +154,12 @@ func refUpdatedFromFlags() (*refUpdated, error) {
|
||||||
return nil, fmt.Errorf("'ref-updated' hook invoked without required arguments")
|
return nil, fmt.Errorf("'ref-updated' hook invoked without required arguments")
|
||||||
}
|
}
|
||||||
|
|
||||||
if update.project != "depot" {
|
if update.project != "depot" || metaRegexp.MatchString(update.ref) {
|
||||||
// this is not an error, but also not something we handle.
|
// this is not an error, but also not something we handle.
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
if branchRegexp.MatchString(update.ref) || metaRegexp.MatchString(update.ref) {
|
if branchRegexp.MatchString(update.ref) {
|
||||||
// these refs don't need special handling, just move on
|
// these refs don't need special handling, just move on
|
||||||
return &update, nil
|
return &update, nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue