debian-mirror-gitlab/lib/gitlab/ci/parsers/security/concerns/deprecated_syntax.rb
2021-10-27 15:23:28 +05:30

36 lines
752 B
Ruby

# frozen_string_literal: true
module Gitlab
module Ci
module Parsers
module Security
module Concerns
module DeprecatedSyntax
extend ActiveSupport::Concern
included do
extend ::Gitlab::Utils::Override
override :parse_report
end
def report_data
@report_data ||= begin
data = super
if data.is_a?(Array)
data = {
"version" => self.class::DEPRECATED_REPORT_VERSION,
"vulnerabilities" => data
}
end
data
end
end
end
end
end
end
end
end