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

ignore non-open pull requests

This commit is contained in:
Brad Rydzewski 2015-06-08 08:42:45 -07:00
parent 13a05a0106
commit b00b46914d

View File

@ -301,6 +301,9 @@ func (g *GitHub) pullRequest(r *http.Request) (*common.Hook, error) {
if hook.Action != "opened" && hook.Action != "synchronize" {
return nil, nil
}
if *hook.PullRequest.State != "open" {
return nil, nil
}
repo := &common.Repo{}
repo.Owner = *hook.Repo.Owner.Login