Revert "Merge branch '28682-can-merge-branch-before-build-is-started' into 'master'"
This reverts commit793be43b35
, reversing changes made to8d0b4872ba
. For projects not using any CI, enabling merge only when pipeline succeeds caused merge requests to be in unmergeable state, which caused significant confusion. See https://gitlab.com/gitlab-org/gitlab-ce/issues/55144 for more details.
This commit is contained in:
parent
185f8a5da6
commit
1bd7f7cb20
3 changed files with 2 additions and 6 deletions
|
@ -978,6 +978,7 @@ 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
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
title: Strictly require a pipeline to merge.
|
||||
merge_request: 22911
|
||||
author:
|
||||
type: changed
|
|
@ -1885,7 +1885,7 @@ describe MergeRequest do
|
|||
allow(subject).to receive(:head_pipeline) { nil }
|
||||
end
|
||||
|
||||
it { expect(subject.mergeable_ci_state?).to be_falsey }
|
||||
it { expect(subject.mergeable_ci_state?).to be_truthy }
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue