mirror of
https://github.com/macports/mpbot-github.git
synced 2026-07-13 03:18:39 -07:00
Split func handling pull_request events
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
package webhook
|
||||
|
||||
func handlePullRequest(body []byte) {
|
||||
// Use |= for openmaintainer/nomaintainer (init 1) flag, nomaintainer take precedence
|
||||
// Loop over ports and aggregate related maintainers
|
||||
}
|
||||
@@ -48,6 +48,14 @@ func (receiver *Receiver) Start() {
|
||||
return
|
||||
}
|
||||
|
||||
switch r.Header.Get("X-GitHub-Event") {
|
||||
case "":
|
||||
w.WriteHeader(http.StatusBadRequest)
|
||||
return
|
||||
case "pull_request":
|
||||
go handlePullRequest(body)
|
||||
}
|
||||
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user