Commit b7a0e1c1 authored by Maxime Orefice's avatar Maxime Orefice

Move codequality feature flag to ci features

This commit moves our codequality feature flag to our aggregated
class containing all our ci feature flags.
parent febbd722
...@@ -1008,7 +1008,7 @@ module Ci ...@@ -1008,7 +1008,7 @@ module Ci
end end
def can_generate_codequality_reports? 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) has_reports?(Ci::JobArtifact.codequality_reports)
end end
......
...@@ -1485,7 +1485,7 @@ class MergeRequest < ApplicationRecord ...@@ -1485,7 +1485,7 @@ class MergeRequest < ApplicationRecord
end end
def has_codequality_reports? 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) actual_head_pipeline&.has_reports?(Ci::JobArtifact.codequality_reports)
end end
......
...@@ -71,6 +71,10 @@ module Gitlab ...@@ -71,6 +71,10 @@ module Gitlab
::Feature.enabled?(:ci_validate_build_dependencies, default_enabled: :yaml) && ::Feature.enabled?(:ci_validate_build_dependencies, default_enabled: :yaml) &&
::Feature.disabled?(:ci_validate_build_dependencies_override, project) ::Feature.disabled?(:ci_validate_build_dependencies_override, project)
end end
def self.display_quality_on_mr_diff?(project)
::Feature.enabled?(:codequality_mr_diff, project, default_enabled: false)
end
end end
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