mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-27 20:31:10 +00:00
Merge pull request #1197 from dtan4/nil-webhook-200
Return 200 even if non-action webhook is come
This commit is contained in:
commit
5d858ec30c
1 changed files with 5 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue