Class: Dependabot::GitSubmodules::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Extended by:
T::Helpers, T::Sig
Defined in:
lib/dependabot/git_submodules/file_fetcher.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/dependabot/git_submodules/file_fetcher.rb', line 17

def self.required_files_in?(filenames)
  filenames.include?(".gitmodules")
end

.required_files_messageObject



22
23
24
# File 'lib/dependabot/git_submodules/file_fetcher.rb', line 22

def self.required_files_message
  "Repo must contain a .gitmodules file."
end

Instance Method Details

#fetch_filesObject



27
28
29
30
31
32
# File 'lib/dependabot/git_submodules/file_fetcher.rb', line 27

def fetch_files
  fetched_files = []
  fetched_files << gitmodules_file
  fetched_files += submodule_refs
  fetched_files
end