Commit 91c7f1e8 authored by Thong Kuah's avatar Thong Kuah

Merge branch 'mc/backstage/artifact-junit-pipeline-endpoint-format' into 'master'

Add html response to #test_report

See merge request gitlab-org/gitlab!19126
parents 87b6705b b4f0e66c
......@@ -156,14 +156,21 @@ class Projects::PipelinesController < Projects::ApplicationController
def test_report
return unless Feature.enabled?(:junit_pipeline_view, project)
if pipeline_test_report == :error
render json: { status: :error_parsing_report }
return
end
respond_to do |format|
format.html do
render 'show'
end
render json: TestReportSerializer
.new(current_user: @current_user)
.represent(pipeline_test_report)
format.json do
if pipeline_test_report == :error
render json: { status: :error_parsing_report }
else
render json: TestReportSerializer
.new(current_user: @current_user)
.represent(pipeline_test_report)
end
end
end
end
private
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment