summaryrefslogtreecommitdiff
path: root/app/controllers/projects/merge_requests_controller.rb
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-07-14 15:52:54 +0000
committerPhil Hughes <me@iamphill.com>2017-07-14 15:52:54 +0000
commit706d99aed8985d0a278107295f5f1d26f0b42383 (patch)
tree251eddb4221ee6e7ac0bd960b109981d5c5975f1 /app/controllers/projects/merge_requests_controller.rb
parent0618ad12e2b50dd01ec1c5ce440345cb64e26133 (diff)
downloadgitlab-ce-706d99aed8985d0a278107295f5f1d26f0b42383.tar.gz
Update Pipeline's badge count in Merge Request and Commits view to match real-time content
Diffstat (limited to 'app/controllers/projects/merge_requests_controller.rb')
-rw-r--r--app/controllers/projects/merge_requests_controller.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index a573b392591..70c41da4de5 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -112,9 +112,14 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
Gitlab::PollingInterval.set_header(response, interval: 10_000)
- render json: PipelineSerializer
- .new(project: @project, current_user: @current_user)
- .represent(@pipelines)
+ render json: {
+ pipelines: PipelineSerializer
+ .new(project: @project, current_user: @current_user)
+ .represent(@pipelines),
+ count: {
+ all: @pipelines.count
+ }
+ }
end
def edit