Commit bba1620f authored by Sean McGivern's avatar Sean McGivern

Merge branch 'kerrizor/add-project-filter-to-sectional-codeowners-feature-flag-check' into 'master'

Add project filter to sectional codeowners feature flag check

See merge request gitlab-org/gitlab!30651
parents 457f9a0c 3e188a46
......@@ -3,8 +3,9 @@
module Gitlab
module CodeOwners
class File
def initialize(blob)
def initialize(blob, project = nil)
@blob = blob
@project = project
end
def parsed_data
......@@ -40,7 +41,7 @@ module Gitlab
end
def get_parsed_data
if Feature.enabled?(:sectional_codeowners, default_enabled: false)
if Feature.enabled?(:sectional_codeowners, @project, default_enabled: false)
return get_parsed_sectional_data
end
......
......@@ -63,7 +63,7 @@ module Gitlab
def load_code_owners_file
code_owners_blob = @project.repository.code_owners_blob(ref: @ref)
Gitlab::CodeOwners::File.new(code_owners_blob)
Gitlab::CodeOwners::File.new(code_owners_blob, @project)
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