about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-30T00·13+0100
committertazjin <mail@tazj.in>2020-06-30T02·51+0000
commit0380841eb11f6cb200081295107fadbca928bc06 (patch)
treebe9d1adf45b01ee150bcc065edfc932cb9639855 /ops
parent7f8184c6b77c0912efad2f08beb64fab068f891f (diff)
fix(besadii): Don't log errors for /meta refs r/1135
These are updated for all sorts of things and should just be silently
ignored by besadii.

Change-Id: I0a6de373b21d6bef5fd31d0a1d3f72c501073bba
Reviewed-on: https://cl.tvl.fyi/c/depot/+/801
Reviewed-by: BuildkiteCI
Reviewed-by: Kane York <rikingcoding@gmail.com>
Tested-by: BuildkiteCI
Diffstat (limited to 'ops')
-rw-r--r--ops/besadii/main.go25
1 files changed, 3 insertions, 2 deletions
diff --git a/ops/besadii/main.go2 b/ops/besadii/main.go2
index 250e65ead834..8fada435ee57 100644
--- a/ops/besadii/main.go2
+++ b/ops/besadii/main.go2
@@ -28,6 +28,7 @@ import (
 )
 
 var branchRegexp = regexp.MustCompile(`^refs/heads/(.*)$`)
+var metaRegexp = regexp.MustCompile(`^refs/changes/\d{0,2}/(\d+)/meta$`)
 var patchsetRegexp = regexp.MustCompile(`^refs/changes/\d{0,2}/(\d+)/(\d+)$`)
 
 // refUpdated is a struct representing the information passed to
@@ -158,8 +159,8 @@ func refUpdatedFromFlags() (*refUpdated, error) {
 		return nil, nil
 	}
 
-	if branchRegexp.MatchString(update.ref) {
-		// branches don't need special handling -> just move on
+	if branchRegexp.MatchString(update.ref) || metaRegexp.MatchString(update.ref) {
+		// these refs don't need special handling, just move on
 		return &update, nil
 	}