Class: Dependabot::Config::FileFetcher
- Inherits:
-
FileFetchers::Base
- Object
- FileFetchers::Base
- Dependabot::Config::FileFetcher
- Defined in:
- lib/dependabot/config/file_fetcher.rb
Constant Summary collapse
- CONFIG_FILE_PATHS =
%w(.github/dependabot.yml .github/dependabot.yaml).freeze
Constants inherited from FileFetchers::Base
FileFetchers::Base::CLIENT_NOT_FOUND_ERRORS
Instance Attribute Summary
Attributes inherited from FileFetchers::Base
#credentials, #repo_contents_path, #source
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from FileFetchers::Base
#clone_repo_contents, #commit, #directory, #files, #initialize, #repo, #target_branch
Constructor Details
This class inherits a constructor from Dependabot::FileFetchers::Base
Class Method Details
.required_files_in?(filenames) ⇒ Boolean
11 12 13 |
# File 'lib/dependabot/config/file_fetcher.rb', line 11 def self.required_files_in?(filenames) CONFIG_FILE_PATHS.any? { |file| filenames.include?(file) } end |
.required_files_message ⇒ Object
15 16 17 |
# File 'lib/dependabot/config/file_fetcher.rb', line 15 def self. "Repo must contain either a #{CONFIG_FILE_PATHS.join(' or a ')} file" end |
Instance Method Details
#config_file ⇒ Object
19 20 21 |
# File 'lib/dependabot/config/file_fetcher.rb', line 19 def config_file @config_file ||= files.first end |