Class: Dependabot::GithubActions::UpdateChecker
- Inherits:
-
UpdateCheckers::Base
- Object
- UpdateCheckers::Base
- Dependabot::GithubActions::UpdateChecker
show all
- Extended by:
- T::Sig
- Defined in:
- lib/dependabot/github_actions/update_checker.rb,
lib/dependabot/github_actions/update_checker/latest_version_finder.rb
Defined Under Namespace
Classes: LatestVersionFinder
Instance Method Summary
collapse
Instance Method Details
#latest_resolvable_version ⇒ Object
30
31
32
33
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 30
def latest_resolvable_version
latest_version
end
|
#latest_resolvable_version_with_no_unlock ⇒ Object
36
37
38
39
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 36
def latest_resolvable_version_with_no_unlock
dependency.version
end
|
#latest_version ⇒ Object
22
23
24
25
26
27
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 22
def latest_version
@latest_version ||= T.let(
T.must(latest_version_finder).latest_release,
T.nilable(T.any(String, Gem::Version))
)
end
|
#lowest_resolvable_security_fix_version ⇒ Object
42
43
44
45
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 42
def lowest_resolvable_security_fix_version
lowest_security_fix_version
end
|
#lowest_security_fix_version ⇒ Object
48
49
50
51
52
53
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 48
def lowest_security_fix_version
@lowest_security_fix_version ||= T.let(
T.must(latest_version_finder).lowest_security_fix_release&.fetch(:version),
T.nilable(Dependabot::Version)
)
end
|
#updated_requirements ⇒ Object
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# File 'lib/dependabot/github_actions/update_checker.rb', line 56
def updated_requirements
dependency.requirements.map do |req|
source = req[:source]
updated = updated_ref(source)
next req unless updated
current = source[:ref]
if req[:type] == "git" &&
git_commit_checker.ref_looks_like_commit_sha?(updated) &&
git_commit_checker.ref_looks_like_commit_sha?(current) &&
updated.start_with?(current)
next req
end
new_source = source.merge(ref: updated)
req.merge(source: new_source)
end
end
|