diff --git a/pkg/remote/builtin/gitlab/gitlab.go b/pkg/remote/builtin/gitlab/gitlab.go index e5c0560dc..fc6713163 100644 --- a/pkg/remote/builtin/gitlab/gitlab.go +++ b/pkg/remote/builtin/gitlab/gitlab.go @@ -227,7 +227,8 @@ func (r *Gitlab) Hook(req *http.Request) (*common.Hook, error) { switch parsed.ObjectKind { case "merge_request": - if (parsed.ObjectAttributes.State != "reopened" || parsed.ObjectAttributes.State != "opened") && parsed.ObjectAttributes.MergeStatus != "unchecked" { + if parsed.ObjectAttributes.State != "reopened" && parsed.ObjectAttributes.MergeStatus != "unchecked" || + parsed.ObjectAttributes.State != "opened" && parsed.ObjectAttributes.MergeStatus != "unchecked" { return nil, nil } diff --git a/pkg/store/mock/mock.go b/pkg/store/mock/mock.go index b199d5066..603d46d5f 100644 --- a/pkg/store/mock/mock.go +++ b/pkg/store/mock/mock.go @@ -229,6 +229,28 @@ func (m *Store) BuildNumber(_a0 *types.Repo, _a1 int) (*types.Build, error) { return r0, r1 } +func (m *Store) BuildPullRequestNumber(_a0 *types.Repo, _a1 int) (*types.Build, error) { + ret := m.Called(_a0, _a1) + + var r0 *types.Build + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Build) + } + r1 := ret.Error(1) + + return r0, r1 +} +func (m *Store) BuildSha(_a0 *types.Repo, _a1, _a2 string) (*types.Build, error) { + ret := m.Called(_a0, _a1, _a2) + + var r0 *types.Build + if ret.Get(0) != nil { + r0 = ret.Get(0).(*types.Build) + } + r1 := ret.Error(1) + + return r0, r1 +} func (m *Store) BuildLast(_a0 *types.Repo, _a1 string) (*types.Build, error) { ret := m.Called(_a0, _a1)