lib/code_ownership.rb in code_ownership-1.32.7 vs lib/code_ownership.rb in code_ownership-1.32.8
- old
+ new
@@ -17,10 +17,11 @@
extend self
extend T::Sig
extend T::Helpers
requires_ancestor { Kernel }
+ GlobsToOwningTeamMap = T.type_alias { T::Hash[String, CodeTeams::Team] }
sig { params(file: String).returns(T.nilable(CodeTeams::Team)) }
def for_file(file)
@for_file ||= T.let(@for_file, T.nilable(T::Hash[String, T.nilable(CodeTeams::Team)]))
@for_file ||= {}
@@ -48,10 +49,10 @@
ownership_information = T.let([], T::Array[String])
ownership_information << "# Code Ownership Report for `#{team.name}` Team"
Mapper.all.each do |mapper|
ownership_information << "## #{mapper.description}"
- codeowners_lines = mapper.codeowners_lines_to_owners
+ codeowners_lines = mapper.globs_to_owner(Private.tracked_files)
ownership_for_mapper = []
codeowners_lines.each do |line, team_for_line|
next if team_for_line.nil?
if team_for_line.name == team.name
ownership_for_mapper << "- #{line}"