summaryrefslogtreecommitdiff
path: root/app/controllers/projects/pipelines_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/projects/pipelines_controller.rb')
-rw-r--r--app/controllers/projects/pipelines_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/projects/pipelines_controller.rb b/app/controllers/projects/pipelines_controller.rb
index a62eb94a3e4..6d902e099d9 100644
--- a/app/controllers/projects/pipelines_controller.rb
+++ b/app/controllers/projects/pipelines_controller.rb
@@ -179,6 +179,16 @@ class Projects::PipelinesController < Projects::ApplicationController
end
end
+ def test_reports_count
+ return unless Feature.enabled?(:junit_pipeline_view, project)
+
+ begin
+ render json: { total_count: pipeline.test_reports_count }.to_json
+ rescue Gitlab::Ci::Parsers::ParserError
+ render json: { total_count: 0 }.to_json
+ end
+ end
+
private
def serialize_pipelines