Commit 11a3c92a authored by Lukas Eipert's avatar Lukas Eipert

Stop exposing Secure artifacts in MR widget entity

We are not consuming the endpoints anymore, since we are now using the
new comparison endpoints. Thus we can stop exposing them.
parent 1c4e95cb
......@@ -40,26 +40,6 @@ module EE
merge_request.enabled_reports
end
expose :sast, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:sast) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:sast)
end
expose :base_path do |merge_request|
base_pipeline_downloadable_path_for_report_type(:sast)
end
end
expose :dependency_scanning, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:dependency_scanning) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:dependency_scanning)
end
expose :base_path do |merge_request|
base_pipeline_downloadable_path_for_report_type(:dependency_scanning)
end
end
expose :license_management, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:license_management) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:license_management)
......@@ -90,26 +70,6 @@ module EE
metrics_reports_project_merge_request_path(merge_request.project, merge_request, format: :json)
end
expose :sast_container, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:container_scanning) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:container_scanning)
end
expose :base_path do |merge_request|
base_pipeline_downloadable_path_for_report_type(:container_scanning)
end
end
expose :dast, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:dast) } do
expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:dast)
end
expose :base_path do |merge_request|
base_pipeline_downloadable_path_for_report_type(:dast)
end
end
expose :pipeline_id, if: -> (mr, _) { mr.head_pipeline } do |merge_request|
merge_request.head_pipeline.id
end
......
......@@ -32,7 +32,7 @@ describe MergeRequestWidgetEntity do
end
def create_all_artifacts
artifacts = %i(codequality sast dependency_scanning container_scanning dast license_management performance)
artifacts = %i(codequality license_management performance)
artifacts.each do |artifact_type|
create(:ee_ci_build, artifact_type, :success, pipeline: pipeline, project: pipeline.project)
......@@ -95,10 +95,6 @@ describe MergeRequestWidgetEntity do
where(:json_entry, :artifact_type) do
:codeclimate | :codequality
:sast | :sast
:dependency_scanning | :dependency_scanning
:sast_container | :container_scanning
:dast | :dast
:license_management | :license_management
:performance | :performance
end
......
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