lib/codeowner_validator/code_owners.rb
# Public: Return all relative paths to files for evaluation if to be owned by a set of code owners
#
# @return [Array] of relative paths to files that are to be included within the code owner evaluation
Return all relative paths to files for evaluation if to be owned by a set of code owners
Return all relative paths to files for evaluation if to be owned by a set of code owners
def included_files
      return @included_files if @included_files
      @included_files = []
      in_folder repo_path do
        Dir.glob(File.join(Dir.pwd, '**/*')) do |f|
          p = Pathname.new(f)
          next unless p.file?
          relative_path_to_file = p.relative_path_from(Dir.pwd)
          @included_files << relative_path_to_file.to_s if whitelist.whitelisted?(relative_path_to_file)
        end
      end
      @included_files
    end
def included_files return @included_files if @included_files @included_files = [ ] in_folder repo_path do Dir . glob ( File . join ( Dir . pwd , '**/*' ) ) do | f | p = Pathname . new ( f ) next unless p . file? relative_path_to_file = p . relative_path_from ( Dir . pwd ) @included_files << relative_path_to_file . to_s if whitelist . whitelisted? ( relative_path_to_file ) end end @included_files end
Public: Return all relative paths to files for evaluation if to be owned by a set of code owners
Public : Return all relative paths to files for evaluation if to be owned by a set of code owners
# only return files for evaluation # in order to properly match, must evaluate relative to the repo location that is # being evaluated.  absolute paths of the files do not match with relative matches
of relative paths to files that are to be included within the code owner evaluation
of relative paths to files that are to be included within the code owner evaluation
Array