lib/codeowners/checker.rb in codeowners-checker-1.0.1 vs lib/codeowners/checker.rb in codeowners-checker-1.0.2
- old
+ new
@@ -45,10 +45,10 @@
def patterns_by_owner
@patterns_by_owner ||=
codeowners.each_with_object(hash_of_arrays) do |line, patterns_by_owner|
next unless line.pattern?
- line.owners.each { |owner| patterns_by_owner[owner] << line.pattern }
+ line.owners.each { |owner| patterns_by_owner[owner] << line.pattern.gsub(%r{^/}, '') }
end
end
def hash_of_arrays
Hash.new { |h, k| h[k] = [] }