lib/codeowner_validator/lists/whitelist.rb
def whitelist_file_paths
        return @whitelist_file_paths if @whitelist_file_paths

        @whitelist_file_paths = %w[CODEOWNERS_WHITELIST .github/CODEOWNERS_WHITELIST]

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

        @whitelist_file_paths
      end
# locations to search for the repository driven codeowners whitelist file
locations to search for the repository driven codeowners whitelist file
locations to search for the repository driven codeowners whitelist file
def whitelist_file_paths
        return @whitelist_file_paths if @whitelist_file_paths
        @whitelist_file_paths = %w[CODEOWNERS_WHITELIST .github/CODEOWNERS_WHITELIST]
        if ENV['CODEOWNER_WHITELIST_FILE_PATHS']
          ENV['CODEOWNER_WHITELIST_FILE_PATHS']&.split(',')&.each(&:strip!)&.each do |str|
            @whitelist_file_paths << str
          end
        end
        @whitelist_file_paths
      end
def whitelist_file_paths return @whitelist_file_paths if @whitelist_file_paths @whitelist_file_paths = %w[ CODEOWNERS_WHITELIST .github/CODEOWNERS_WHITELIST ] if ENV [ 'CODEOWNER_WHITELIST_FILE_PATHS' ] ENV [ 'CODEOWNER_WHITELIST_FILE_PATHS' ] &. split ( ',' ) &. each ( & :strip! ) &. each do | str | @whitelist_file_paths << str end end @whitelist_file_paths end
locations to search for the repository driven codeowners whitelist file
locations to search for the repository driven codeowners whitelist file
# allow customization of the locations to search for the file