diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 09:08:39 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-11 09:08:39 +0000 |
commit | 1078b7bf25c2cb6e03c57da9ae25b0512858556f (patch) | |
tree | a50fbfaddb22aca89055296c4c532c7ecb2b1ca0 /app/controllers/projects | |
parent | 55733b19c526145cceb120e8bb874d476a84383a (diff) | |
download | gitlab-ce-1078b7bf25c2cb6e03c57da9ae25b0512858556f.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/controllers/projects')
-rw-r--r-- | app/controllers/projects/pipelines_controller.rb | 10 |
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 |