diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 5c6396fba9f55e04464ed41dcbe1859cdb3ecc39..acdb5ba5c4f967667a1abcbf168a815f1dbb435b 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -137,6 +137,8 @@ class Projects::MergeRequestsController < Projects::ApplicationController
   end
 
   def pipelines
+    @pipelines = Ci::Pipeline.where(ref: @merge_request.source_branch)
+
     respond_to do |format|
       format.html do
         define_discussion_vars
diff --git a/app/views/projects/commit/_pipelines_list.haml b/app/views/projects/commit/_pipelines_list.haml
index 0d6de6dfa2ef9da28ea29891767eaf7e2f9364a7..03db765180a9266e7b5335474cbc0c5a98d83c85 100644
--- a/app/views/projects/commit/_pipelines_list.haml
+++ b/app/views/projects/commit/_pipelines_list.haml
@@ -14,4 +14,4 @@
                 = stage.titleize
           %th
           %th
-        = render pipelines, commit_sha: true, stage: true, allow_retry: true, stages: stages
+        = render pipelines, commit_sha: true, stage: true, allow_retry: true, stages: pipelines.stages
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index a78407f26ea985c031b8af9136b1f8b62cc3d00e..9ae2b52bace1a2dc1eb53a05a75ecae49aa1c47c 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -56,7 +56,7 @@
           %li.pipelines-tab
             = link_to pipelines_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#pipelines', action: 'pipelines', toggle: 'tab'} do
               Pipelines
-              %span.badge= @statuses.size
+              %span.badge
           %li.builds-tab
             = link_to builds_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), data: {target: '#builds', action: 'builds', toggle: 'tab'} do
               Builds