Welcome to mirror list, hosted at ThFree Co, Russian Federation.

degradation_type.rb « codequality_reports_comparer « security « types « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fb7d722069f9e24f663792b5b47585aec3657aa0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# frozen_string_literal: true

module Types
  module Security
    module CodequalityReportsComparer
      # rubocop: disable Graphql/AuthorizeTypes (The resolver authorizes the request)
      class DegradationType < BaseObject
        graphql_name 'CodequalityReportsComparerReportDegradation'

        description 'Represents a degradation on the compared codequality report.'

        field :description, GraphQL::Types::String,
          null: false,
          description: 'Description of the code quality degradation.'

        field :fingerprint, GraphQL::Types::String,
          null: false,
          description: 'Unique fingerprint to identify the code quality degradation. For example, an MD5 hash.'

        field :severity, Types::Ci::CodeQualityDegradationSeverityEnum,
          null: false,
          description:
            "Severity of the code quality degradation " \
            "(#{::Gitlab::Ci::Reports::CodequalityReports::SEVERITY_PRIORITIES.keys.map(&:upcase).join(', ')})."

        field :file_path, GraphQL::Types::String,
          null: false,
          description: 'Relative path to the file containing the code quality degradation.'

        field :line, GraphQL::Types::Int,
          null: false,
          description: 'Line on which the code quality degradation occurred.'

        field :web_url, GraphQL::Types::String,
          null: true,
          description: 'URL to the file along with line number.'

        field :engine_name, GraphQL::Types::String,
          null: false,
          description: 'Code quality plugin that reported the degradation.'
      end
      # rubocop: enable Graphql/AuthorizeTypes
    end
  end
end