about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@google.com>2020-02-21T23·16+0000
committerVincent Ambo <tazjin@google.com>2020-02-21T23·16+0000
commit5ed68f0f6b192cffb1bd4d1790360583d08018bb (patch)
tree52005bbd2226c75137f206c93ec16a65d864dfcc
parent8fe90430ee2bb00dd78587b9849b60e66c79680e (diff)
fix(ops/besadii): Only trigger builds for branches
-rw-r--r--ops/besadii/main.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/ops/besadii/main.go b/ops/besadii/main.go
index 0241eb84491c..460eddf26538 100644
--- a/ops/besadii/main.go
+++ b/ops/besadii/main.go
@@ -143,10 +143,14 @@ func parseRefUpdates() ([]refUpdate, error) {
 			return nil, fmt.Errorf("invalid ref update: '%s'", line)
 		}
 
+		if !strings.HasPrefix(fragments[2], "refs/heads/") {
+			continue
+		}
+
 		updates = append(updates, refUpdate{
 			old:  fragments[0],
 			new:  fragments[1],
-			name: fragments[2],
+			name: strings.TrimPrefix(fragments[2], "refs/heads/"),
 		})
 	}