Pārlūkot izejas kodu

Filter push events by ref

Brendan Abolivier 6 gadus atpakaļ
vecāks
revīzija
1391394ac9
Parakstījis: Brendan Abolivier <contact@brendanabolivier.com> GPG atslēgas ID: 8EF1500759F70623
1 mainītis faili ar 5 papildinājumiem un 0 dzēšanām
  1. 5
    0
      src/pusher/webhook.go

+ 5
- 0
src/pusher/webhook.go Parādīt failu

@@ -39,6 +39,11 @@ func HandlePush(payload interface{}, header webhooks.Header) {
39 39
 		panic(err)
40 40
 	}
41 41
 
42
+	// Only push changes made on master to Grafana
43
+	if pl.Ref != "refs/heads/master" {
44
+		return
45
+	}
46
+
42 47
 	// Iterate over the commits descriptions from the payload
43 48
 	for _, commit := range pl.Commits {
44 49
 		// We don't want to process commits made by the puller