Commit 34e16da8 authored by Mark Chao's avatar Mark Chao

Merge branch 'kerrizor/drop-unused-param-from-codeowners-file-initialize' into 'master'

Drop unused project param from #initialize

See merge request gitlab-org/gitlab!42510
parents 06a793fd 8bf36837
...@@ -7,9 +7,8 @@ module Gitlab ...@@ -7,9 +7,8 @@ module Gitlab
SECTION_HEADER_REGEX = /\[(.*?)\]/.freeze SECTION_HEADER_REGEX = /\[(.*?)\]/.freeze
def initialize(blob, project = nil) def initialize(blob)
@blob = blob @blob = blob
@project = project
end end
def parsed_data def parsed_data
......
...@@ -63,7 +63,7 @@ module Gitlab ...@@ -63,7 +63,7 @@ module Gitlab
def load_code_owners_file def load_code_owners_file
code_owners_blob = @project.repository.code_owners_blob(ref: @ref) code_owners_blob = @project.repository.code_owners_blob(ref: @ref)
Gitlab::CodeOwners::File.new(code_owners_blob, @project) Gitlab::CodeOwners::File.new(code_owners_blob)
end end
end end
end end
......
...@@ -5,6 +5,8 @@ require 'spec_helper' ...@@ -5,6 +5,8 @@ require 'spec_helper'
RSpec.describe Gitlab::CodeOwners::File do RSpec.describe Gitlab::CodeOwners::File do
include FakeBlobHelpers include FakeBlobHelpers
# 'project' is required for the #fake_blob helper
#
let(:project) { build(:project) } let(:project) { build(:project) }
let(:file_content) do let(:file_content) do
File.read(Rails.root.join('ee', 'spec', 'fixtures', 'codeowners_example')) File.read(Rails.root.join('ee', 'spec', 'fixtures', 'codeowners_example'))
......
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