1
0
mirror of https://github.com/woodpecker-ci/woodpecker.git synced 2024-11-30 08:06:52 +02:00

Return 200 even if non-action webhook is come

This commit is contained in:
Daisuke Fujita 2015-09-11 19:05:30 +09:00
parent 0860d36466
commit bdd4742171

View File

@ -40,6 +40,11 @@ func PostHook(c web.C, w http.ResponseWriter, r *http.Request) {
return
}
if hook == nil {
w.WriteHeader(http.StatusOK)
return
}
// in some cases we have neither a hook nor error. An example
// would be GitHub sending a ping request to the URL, in which
// case we'll just exit quiely with an 'OK'