Strictly require a pipeline to merge
This commit is contained in:
parent
e0353a2485
commit
949cc27ac4
|
|
@ -966,7 +966,6 @@ class MergeRequest < ActiveRecord::Base
|
||||||
|
|
||||||
def mergeable_ci_state?
|
def mergeable_ci_state?
|
||||||
return true unless project.only_allow_merge_if_pipeline_succeeds?
|
return true unless project.only_allow_merge_if_pipeline_succeeds?
|
||||||
return true unless head_pipeline
|
|
||||||
|
|
||||||
actual_head_pipeline&.success? || actual_head_pipeline&.skipped?
|
actual_head_pipeline&.success? || actual_head_pipeline&.skipped?
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -1782,7 +1782,7 @@ describe MergeRequest do
|
||||||
allow(subject).to receive(:head_pipeline) { nil }
|
allow(subject).to receive(:head_pipeline) { nil }
|
||||||
end
|
end
|
||||||
|
|
||||||
it { expect(subject.mergeable_ci_state?).to be_truthy }
|
it { expect(subject.mergeable_ci_state?).to be_falsey }
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue