summaryrefslogtreecommitdiff
path: root/app/controllers/projects/merge_requests_controller.rb
diff options
context:
space:
mode:
authorEric Eastwood <contact@ericeastwood.com>2017-02-14 16:08:30 -0600
committerEric Eastwood <contact@ericeastwood.com>2017-03-02 02:49:03 -0600
commit605fff91236bb225bb1bddad116ccae3502930e5 (patch)
treefb209e6f9eb98b6bbafac295bd81581422394b73 /app/controllers/projects/merge_requests_controller.rb
parentb6a945b39354ec2b2c09fc5f6904dfbf8990df26 (diff)
downloadgitlab-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/controllers/projects/merge_requests_controller.rb')
-rw-r--r--app/controllers/projects/merge_requests_controller.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 76519022381..82f9b6e06db 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -324,6 +324,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def merge_check
@merge_request.check_if_can_be_merged
+ @pipelines = @merge_request.all_pipelines
render partial: "projects/merge_requests/widget/show.html.haml", layout: false
end
@@ -446,6 +447,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def ci_status
pipeline = @merge_request.head_pipeline
+ @pipelines = @merge_request.all_pipelines
if pipeline
status = pipeline.status
@@ -464,7 +466,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
sha: (merge_request.diff_head_commit.short_id if merge_request.diff_head_sha),
status: status,
coverage: coverage,
- pipeline: pipeline.try(:id)
+ pipeline: pipeline.try(:id),
+ has_ci: @merge_request.has_ci?
}
render json: response