From b9c103cef80d34fef6e2c106ac146dc88776d678 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Sat, 6 Sep 2014 13:08:56 -0700 Subject: [PATCH] includes fix for #335 in exp branch --- plugin/remote/gitlab/gitlab.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugin/remote/gitlab/gitlab.go b/plugin/remote/gitlab/gitlab.go index 7442fcb21..61423297f 100644 --- a/plugin/remote/gitlab/gitlab.go +++ b/plugin/remote/gitlab/gitlab.go @@ -152,6 +152,10 @@ func (r *Gitlab) ParseHook(req *http.Request) (*model.Hook, error) { return nil, err } + if len(parsed.After) == 0 || parsed.TotalCommitsCount == 0 { + return nil, nil + } + if parsed.ObjectKind == "merge_request" { // TODO (bradrydzewski) figure out how to handle merge requests return nil, nil