lib/codeowner_validator/code_owners.rb
def codeowner_file_paths
      return @codeowner_file_paths if @codeowner_file_paths

      @codeowner_file_paths = %w[CODEOWNERS docs/CODEOWNERS .github/CODEOWNERS]

      # allow customization of the locations to search for the file
      if ENV['CODEOWNER_FILE_PATHS']
        ENV['CODEOWNER_FILE_PATHS']&.split(',')&.each(&:strip!)&.each do |str|
          @codeowner_file_paths << str
        end
      end

      @codeowner_file_paths
    end
# locations to search for the codeowners file
locations to search for the codeowners file
locations to search for the codeowners file
def codeowner_file_paths
      return @codeowner_file_paths if @codeowner_file_paths
      @codeowner_file_paths = %w[CODEOWNERS docs/CODEOWNERS .github/CODEOWNERS]
      if ENV['CODEOWNER_FILE_PATHS']
        ENV['CODEOWNER_FILE_PATHS']&.split(',')&.each(&:strip!)&.each do |str|
          @codeowner_file_paths << str
        end
      end
      @codeowner_file_paths
    end
def codeowner_file_paths return @codeowner_file_paths if @codeowner_file_paths @codeowner_file_paths = %w[ CODEOWNERS docs/CODEOWNERS .github/CODEOWNERS ] if ENV [ 'CODEOWNER_FILE_PATHS' ] ENV [ 'CODEOWNER_FILE_PATHS' ] &. split ( ',' ) &. each ( & :strip! ) &. each do | str | @codeowner_file_paths << str end end @codeowner_file_paths end
locations to search for the codeowners file
locations to search for the codeowners file
# allow customization of the locations to search for the file