diff options
author | Eric Eastwood <contact@ericeastwood.com> | 2017-02-14 16:08:30 -0600 |
---|---|---|
committer | Eric Eastwood <contact@ericeastwood.com> | 2017-03-02 02:49:03 -0600 |
commit | 605fff91236bb225bb1bddad116ccae3502930e5 (patch) | |
tree | fb209e6f9eb98b6bbafac295bd81581422394b73 /app/models | |
parent | b6a945b39354ec2b2c09fc5f6904dfbf8990df26 (diff) | |
download | gitlab-ce-605fff91236bb225bb1bddad116ccae3502930e5.tar.gz |
Default to subtle MR mege button until CI status is available28010-mr-merge-button-default-to-danger
See https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9245
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/merge_request.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index 81bde54d5dc..0f7b8311588 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -684,7 +684,10 @@ class MergeRequest < ActiveRecord::Base end def has_ci? - source_project.try(:ci_service) && commits.any? + has_ci_integration = source_project.try(:ci_service) + uses_gitlab_ci = all_pipelines.any? + + (has_ci_integration || uses_gitlab_ci) && commits.any? end def branch_missing? |