Class: Dependabot::GithubActions::Helpers::Githelper
- Inherits:
-
Object
- Object
- Dependabot::GithubActions::Helpers::Githelper
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/github_actions/helpers.rb
Instance Attribute Summary collapse
-
#credentials ⇒ Object
readonly
Returns the value of attribute credentials.
-
#dependency ⇒ Object
readonly
Returns the value of attribute dependency.
-
#ignored_versions ⇒ Object
readonly
Returns the value of attribute ignored_versions.
-
#raise_on_ignored ⇒ Object
readonly
Returns the value of attribute raise_on_ignored.
Instance Method Summary collapse
- #git_commit_checker ⇒ Object
- #git_commit_checker_for(source) ⇒ Object
-
#initialize(dependency:, credentials:, ignored_versions: [], raise_on_ignored: false, consider_version_branches_pinned: false, dependency_source_details: nil) ⇒ Githelper
constructor
A new instance of Githelper.
Constructor Details
#initialize(dependency:, credentials:, ignored_versions: [], raise_on_ignored: false, consider_version_branches_pinned: false, dependency_source_details: nil) ⇒ Githelper
Returns a new instance of Githelper.
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/dependabot/github_actions/helpers.rb', line 33 def initialize( dependency:, credentials:, ignored_versions: [], raise_on_ignored: false, consider_version_branches_pinned: false, dependency_source_details: nil ) @dependency = dependency @credentials = credentials @ignored_versions = ignored_versions @raise_on_ignored = raise_on_ignored @consider_version_branches_pinned = consider_version_branches_pinned @dependency_source_details = dependency_source_details end |
Instance Attribute Details
#credentials ⇒ Object (readonly)
Returns the value of attribute credentials.
53 54 55 |
# File 'lib/dependabot/github_actions/helpers.rb', line 53 def credentials @credentials end |
#dependency ⇒ Object (readonly)
Returns the value of attribute dependency.
50 51 52 |
# File 'lib/dependabot/github_actions/helpers.rb', line 50 def dependency @dependency end |
#ignored_versions ⇒ Object (readonly)
Returns the value of attribute ignored_versions.
56 57 58 |
# File 'lib/dependabot/github_actions/helpers.rb', line 56 def ignored_versions @ignored_versions end |
#raise_on_ignored ⇒ Object (readonly)
Returns the value of attribute raise_on_ignored.
59 60 61 |
# File 'lib/dependabot/github_actions/helpers.rb', line 59 def raise_on_ignored @raise_on_ignored end |
Instance Method Details
#git_commit_checker ⇒ Object
62 63 64 65 66 67 |
# File 'lib/dependabot/github_actions/helpers.rb', line 62 def git_commit_checker @git_commit_checker ||= T.let( git_commit_checker_for(nil), T.nilable(Dependabot::GitCommitChecker) ) end |
#git_commit_checker_for(source) ⇒ Object
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 |
# File 'lib/dependabot/github_actions/helpers.rb', line 70 def git_commit_checker_for(source) @git_commit_checkers ||= T.let( {}, T.nilable(T::Hash[T.nilable(T::Hash[Symbol, String]), Dependabot::GitCommitChecker]) ) @git_commit_checkers[source] ||= Dependabot::GitCommitChecker.new( dependency: dependency, credentials: credentials, ignored_versions: ignored_versions, raise_on_ignored: raise_on_ignored, consider_version_branches_pinned: true, dependency_source_details: source ) end |