mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2025-09-19 22:54:54 +00:00
Return 200 even if non-action webhook is come
This commit is contained in:
@@ -40,6 +40,11 @@ func PostHook(c web.C, w http.ResponseWriter, r *http.Request) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if hook == nil {
|
||||||
|
w.WriteHeader(http.StatusOK)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
// in some cases we have neither a hook nor error. An example
|
// in some cases we have neither a hook nor error. An example
|
||||||
// would be GitHub sending a ping request to the URL, in which
|
// would be GitHub sending a ping request to the URL, in which
|
||||||
// case we'll just exit quiely with an 'OK'
|
// case we'll just exit quiely with an 'OK'
|
||||||
|
Reference in New Issue
Block a user