lib/codeowner_validator/code_owners.rb
# Public: Returns the patterns utilized with an array association to those patterns
#
# @return [Hash] The patterns keyed by the team with an array of associations
#
# Example Response:
# {
#   "@orion-delivery/delivery-team": [
#     "*"
#   ],
#   "@orion-delivery/orion-delivery-ets": [
#     "config/domains/production/**/*",
#     "config/domains/sandbox/**/*"
#   ],
#   "@orion-delivery/orion-shells": [
#     "config/feature_definitions/authn-android-enable_biometric_unlock.yml",
#     "config/domains/cert-int/IONServer_CERTIFICATION.yml"
#   ]
# }
Returns the patterns utilized with an array association to those patterns
Returns the patterns utilized with an array association to those patterns
def patterns_by_owner
      @patterns_by_owner ||=
        main_group.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.gsub(/^\//, '') }
        end
    end
def patterns_by_owner @patterns_by_owner ||= main_group . 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 . gsub ( / ^ \/ / , '' ) } end end
Public: Returns the patterns utilized with an array association to those patterns
Public : Returns the patterns utilized with an array association to those patterns
The patterns keyed by the team with an array of associations Example Response: { "@orion-delivery/delivery-team": [ "*" ], "@orion-delivery/orion-delivery-ets": [ "config/domains/production", "config/domains/sandbox" ], "@orion-delivery/orion-shells": [ "config/feature_definitions/authn-android-enable_biometric_unlock.yml", "config/domains/cert-int/IONServer_CERTIFICATION.yml" ] }
The patterns keyed by the team with an array of associations Example Response : { " @orion - delivery / delivery - team " : [ " * " ] " @orion - delivery / orion - delivery - ets " : [ " config / domains / production " " config / domains / sandbox " ] " @orion - delivery / orion - shells " : [ " config / feature_definitions / authn - android - enable_biometric_unlock . yml " " config / domains / cert - int / IONServer_CERTIFICATION . yml " ] }
Hash