Commit 85f430cb authored by Grzegorz Bizon's avatar Grzegorz Bizon

Merge branch 'sh-revert-mr-22911' into 'master'

Revert "Merge branch '28682-can-merge-branch-before-build-is-started' into 'master'"

See merge request gitlab-org/gitlab-ce!23715
parents 97ba7735 1bd7f7cb
......@@ -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
......
---
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment