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