summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bizon <grzegorz@gitlab.com>2018-12-11 08:58:46 +0000
committerGrzegorz Bizon <grzegorz@gitlab.com>2018-12-11 08:58:46 +0000
commit85f430cb3cde4ff8c4d24c1b2a426670e38dd44f (patch)
tree7124cdc73f3f98e41fbae527c7df96d620e7cec9
parent97ba7735eaefa0e749295b722434e1d3826bbbc2 (diff)
parent1bd7f7cb201a246f3376481f7d7ab53f415f843b (diff)
downloadgitlab-ce-85f430cb3cde4ff8c4d24c1b2a426670e38dd44f.tar.gz
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
-rw-r--r--app/models/merge_request.rb1
-rw-r--r--changelogs/unreleased/28682-can-merge-branch-before-build-is-started.yml5
-rw-r--r--spec/models/merge_request_spec.rb2
3 files changed, 2 insertions, 6 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 861211ffc0a..77e48ce11e8 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -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
diff --git a/changelogs/unreleased/28682-can-merge-branch-before-build-is-started.yml b/changelogs/unreleased/28682-can-merge-branch-before-build-is-started.yml
deleted file mode 100644
index 5ffd93e098f..00000000000
--- a/changelogs/unreleased/28682-can-merge-branch-before-build-is-started.yml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-title: Strictly require a pipeline to merge.
-merge_request: 22911
-author:
-type: changed
diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb
index 9b60054e14a..c3152d2021b 100644
--- a/spec/models/merge_request_spec.rb
+++ b/spec/models/merge_request_spec.rb
@@ -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