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 ...@@ -40,26 +40,6 @@ module EE
merge_request.enabled_reports merge_request.enabled_reports
end 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 :license_management, if: -> (mr, _) { head_pipeline_downloadable_path_for_report_type(:license_management) } do
expose :head_path do |merge_request| expose :head_path do |merge_request|
head_pipeline_downloadable_path_for_report_type(:license_management) head_pipeline_downloadable_path_for_report_type(:license_management)
...@@ -90,26 +70,6 @@ module EE ...@@ -90,26 +70,6 @@ module EE
metrics_reports_project_merge_request_path(merge_request.project, merge_request, format: :json) metrics_reports_project_merge_request_path(merge_request.project, merge_request, format: :json)
end 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| expose :pipeline_id, if: -> (mr, _) { mr.head_pipeline } do |merge_request|
merge_request.head_pipeline.id merge_request.head_pipeline.id
end end
......
...@@ -32,7 +32,7 @@ describe MergeRequestWidgetEntity do ...@@ -32,7 +32,7 @@ describe MergeRequestWidgetEntity do
end end
def create_all_artifacts 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| artifacts.each do |artifact_type|
create(:ee_ci_build, artifact_type, :success, pipeline: pipeline, project: pipeline.project) create(:ee_ci_build, artifact_type, :success, pipeline: pipeline, project: pipeline.project)
...@@ -95,10 +95,6 @@ describe MergeRequestWidgetEntity do ...@@ -95,10 +95,6 @@ describe MergeRequestWidgetEntity do
where(:json_entry, :artifact_type) do where(:json_entry, :artifact_type) do
:codeclimate | :codequality :codeclimate | :codequality
:sast | :sast
:dependency_scanning | :dependency_scanning
:sast_container | :container_scanning
:dast | :dast
:license_management | :license_management :license_management | :license_management
:performance | :performance :performance | :performance
end 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