From 8f139daec2a8a18d30377a29793c0daad2a78b41 Mon Sep 17 00:00:00 2001 From: Andrew Karpow Date: Mon, 24 Feb 2014 13:47:54 +0100 Subject: [PATCH] add github ping hook handler --- pkg/handler/hooks.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/handler/hooks.go b/pkg/handler/hooks.go index 2cb719681..75f775993 100644 --- a/pkg/handler/hooks.go +++ b/pkg/handler/hooks.go @@ -17,6 +17,11 @@ import ( // attempts to trigger a build. func Hook(w http.ResponseWriter, r *http.Request) error { + // handle github ping + if r.Header.Get("X-Github-Event") == "ping" { + return RenderText(w, http.StatusText(http.StatusOK), http.StatusOK) + } + // if this is a pull request route // to a different handler if r.Header.Get("X-Github-Event") == "pull_request" {