Class: Dependabot::GithubActions::FileFetcher

Inherits:
FileFetchers::Base
  • Object
show all
Defined in:
lib/dependabot/github_actions/file_fetcher.rb

Constant Summary collapse

FILENAME_PATTERN =
/^(\.github|action.ya?ml)$/.freeze

Class Method Summary collapse

Class Method Details

.required_files_in?(filenames) ⇒ Boolean



11
12
13
# File 'lib/dependabot/github_actions/file_fetcher.rb', line 11

def self.required_files_in?(filenames)
  filenames.any? { |f| f.match?(FILENAME_PATTERN) }
end

.required_files_messageObject



15
16
17
# File 'lib/dependabot/github_actions/file_fetcher.rb', line 15

def self.required_files_message
  "Repo must contain a .github/workflows directory with YAML files or an action.yml file"
end