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

codequality_reports_comparer_resolver.rb « resolvers « graphql « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 1c034887c0d9c76fd69e29e6d081d32d631fe58e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

module Resolvers
  class CodequalityReportsComparerResolver < BaseResolver
    include Gitlab::Graphql::Authorize::AuthorizeResource

    type ::Types::Security::CodequalityReportsComparerType, null: true

    authorize :read_build

    def resolve
      return unless Feature.enabled?(:sast_reports_in_inline_diff, object.project)

      authorize!(object.actual_head_pipeline)

      object.compare_codequality_reports
    end
  end
end