Commit 5b9ddc8a authored by Imre Farkas's avatar Imre Farkas

Merge branch...

Merge branch '214571-rename-vulnerabilities-occurrenceentity-to-vulnerabilities-findingentity' into 'master'

Rename Vulnerabilities::OccurrenceEntity to ::FindingEntity

See merge request gitlab-org/gitlab!30322
parents ec47570f d55be841
# frozen_string_literal: true # frozen_string_literal: true
class Vulnerabilities::OccurrenceEntity < Grape::Entity class Vulnerabilities::FindingEntity < Grape::Entity
include ::EE::ProjectsHelper # rubocop: disable Cop/InjectEnterpriseEditionModule include ::EE::ProjectsHelper # rubocop: disable Cop/InjectEnterpriseEditionModule
include RequestAwareEntity include RequestAwareEntity
......
...@@ -6,8 +6,8 @@ class Vulnerabilities::OccurrenceReportsComparerEntity < Grape::Entity ...@@ -6,8 +6,8 @@ class Vulnerabilities::OccurrenceReportsComparerEntity < Grape::Entity
expose :base_report_created_at expose :base_report_created_at
expose :base_report_out_of_date expose :base_report_out_of_date
expose :head_report_created_at expose :head_report_created_at
expose :added, using: Vulnerabilities::OccurrenceEntity expose :added, using: Vulnerabilities::FindingEntity
expose :fixed, using: Vulnerabilities::OccurrenceEntity expose :fixed, using: Vulnerabilities::FindingEntity
expose :existing, using: Vulnerabilities::OccurrenceEntity expose :existing, using: Vulnerabilities::FindingEntity
expose :scans, using: Vulnerabilities::ScanEntity expose :scans, using: Vulnerabilities::ScanEntity
end end
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
class Vulnerabilities::OccurrenceSerializer < BaseSerializer class Vulnerabilities::OccurrenceSerializer < BaseSerializer
include WithPagination include WithPagination
entity Vulnerabilities::OccurrenceEntity entity Vulnerabilities::FindingEntity
def represent(resource, opts = {}) def represent(resource, opts = {})
if paginated? if paginated?
......
...@@ -56,7 +56,7 @@ module API ...@@ -56,7 +56,7 @@ module API
use :pagination use :pagination
end end
desc 'Get a list of project vulnerability findings' do desc 'Get a list of project vulnerability findings' do
success ::Vulnerabilities::OccurrenceEntity success ::Vulnerabilities::FindingEntity
end end
get ':id/vulnerability_findings' do get ':id/vulnerability_findings' do
authorize! :read_vulnerability, user_project authorize! :read_vulnerability, user_project
...@@ -75,7 +75,7 @@ module API ...@@ -75,7 +75,7 @@ module API
Gitlab::Vulnerabilities::OccurrencesPreloader.preload_feedback!(vulnerability_occurrences) Gitlab::Vulnerabilities::OccurrencesPreloader.preload_feedback!(vulnerability_occurrences)
present vulnerability_occurrences, present vulnerability_occurrences,
with: ::Vulnerabilities::OccurrenceEntity, with: ::Vulnerabilities::FindingEntity,
request: GrapeRequestProxy.new(request, current_user) request: GrapeRequestProxy.new(request, current_user)
end end
end end
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
require 'spec_helper' require 'spec_helper'
describe Vulnerabilities::OccurrenceEntity do describe Vulnerabilities::FindingEntity do
let_it_be(:user) { create(:user) } let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) } let_it_be(:project) { create(:project) }
......
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