Merge branch '28682-can-merge-branch-before-build-is-started' into 'master'
Resolve "Can merge branch before build is started" Closes #28682 See merge request gitlab-org/gitlab-ce!22911
This commit is contained in:
commit
793be43b35
3 changed files with 6 additions and 2 deletions
|
@ -966,7 +966,6 @@ class MergeRequest < ActiveRecord::Base
|
|||
|
||||
def mergeable_ci_state?
|
||||
return true unless project.only_allow_merge_if_pipeline_succeeds?
|
||||
return true unless head_pipeline
|
||||
|
||||
actual_head_pipeline&.success? || actual_head_pipeline&.skipped?
|
||||
end
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Strictly require a pipeline to merge.
|
||||
merge_request: 22911
|
||||
author:
|
||||
type: changed
|
|
@ -1782,7 +1782,7 @@ describe MergeRequest do
|
|||
allow(subject).to receive(:head_pipeline) { nil }
|
||||
end
|
||||
|
||||
it { expect(subject.mergeable_ci_state?).to be_truthy }
|
||||
it { expect(subject.mergeable_ci_state?).to be_falsey }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue