mirror of
https://github.com/woodpecker-ci/woodpecker.git
synced 2024-11-25 19:31:05 +00:00
add github ping hook handler
This commit is contained in:
parent
dc478a4ca8
commit
8f139daec2
1 changed files with 5 additions and 0 deletions
|
@ -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" {
|
||||
|
|
Loading…
Reference in a new issue