Commit 7fd93540 authored by Robert Speicher's avatar Robert Speicher

Merge branch 'mo-move-quality-feature-flag' into 'master'

Move codequality feature flag to ci features

See merge request gitlab-org/gitlab!52618
parents be4f0976 b7a0e1c1
......@@ -1008,7 +1008,7 @@ module Ci
end
def can_generate_codequality_reports?
return false unless Feature.enabled?(:codequality_mr_diff, project)
return false unless ::Gitlab::Ci::Features.display_quality_on_mr_diff?(project)
has_reports?(Ci::JobArtifact.codequality_reports)
end
......
......@@ -1485,7 +1485,7 @@ class MergeRequest < ApplicationRecord
end
def has_codequality_reports?
return false unless Feature.enabled?(:codequality_mr_diff, project)
return false unless ::Gitlab::Ci::Features.display_quality_on_mr_diff?(project)
actual_head_pipeline&.has_reports?(Ci::JobArtifact.codequality_reports)
end
......
......@@ -71,6 +71,10 @@ module Gitlab
::Feature.enabled?(:ci_validate_build_dependencies, default_enabled: :yaml) &&
::Feature.disabled?(:ci_validate_build_dependencies_override, project)
end
def self.display_quality_on_mr_diff?(project)
::Feature.enabled?(:codequality_mr_diff, project, default_enabled: false)
end
end
end
end
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