Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-11 12:08:39 +0300
commit1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch)
treea50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /app/controllers/projects/pipelines_controller.rb
parent55733b19c526145cceb120e8bb874d476a84383a (diff)
Add latest changes from gitlab-org/gitlab@master
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