FIxes tests

This commit is contained in:
Kirill Zaitsev 2015-08-22 18:06:58 +03:00 committed by Kirilll Zaitsev
parent fd98e26575
commit 7716c702be
2 changed files with 24 additions and 1 deletions

View file

@ -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
}

View file

@ -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)