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" { if hook.Action != "opened" && hook.Action != "synchronize" {
return nil, nil return nil, nil
} }
if *hook.PullRequest.State != "open" {
return nil, nil
}
repo := &common.Repo{} repo := &common.Repo{}
repo.Owner = *hook.Repo.Owner.Login repo.Owner = *hook.Repo.Owner.Login