소스 검색

Filter push events by ref

Brendan Abolivier 7 년 전
부모
커밋
1391394ac9
로그인 계정: Brendan Abolivier <contact@brendanabolivier.com> GPG 키 ID: 8EF1500759F70623
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5
    0
      src/pusher/webhook.go

+ 5
- 0
src/pusher/webhook.go 파일 보기

39
 		panic(err)
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
 	// Iterate over the commits descriptions from the payload
47
 	// Iterate over the commits descriptions from the payload
43
 	for _, commit := range pl.Commits {
48
 	for _, commit := range pl.Commits {
44
 		// We don't want to process commits made by the puller
49
 		// We don't want to process commits made by the puller