File tree Expand file tree Collapse file tree
lib/dependabot/github_actions
spec/dependabot/github_actions/update_checker Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,7 +146,7 @@ def fetch_tag_and_release_date
146146
147147 # Log an error if we couldn't fetch any release dates
148148 if result . empty? && allowed_version_tags . any?
149- Dependabot . logger . error ( "Error fetching tag and release date : unable to fetch release dates for any allowed tags" )
149+ Dependabot . logger . error ( "Error: unable to fetch release dates for any allowed tags" )
150150 end
151151
152152 result
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ def latest_version_tag
107107
108108 sig { returns ( T . nilable ( Dependabot ::GithubActions ::Package ::PackageDetailsFetcher ) ) }
109109 def package_details_fetcher
110- @package_details_fetcher = T . let (
110+ @package_details_fetcher || = T . let (
111111 Dependabot ::GithubActions ::Package ::PackageDetailsFetcher
112112 . new (
113113 dependency : dependency ,
Original file line number Diff line number Diff line change 6060 credentials : github_credentials ,
6161 security_advisories : security_advisories ,
6262 ignored_versions : ignored_versions ,
63- raise_on_ignored : raise_on_ignored
63+ raise_on_ignored : raise_on_ignored ,
64+ cooldown_options : Dependabot ::Package ::ReleaseCooldownOptions . new ( default_days : 90 )
6465 )
6566 end
6667
415416 end
416417
417418 before do
418- allow_any_instance_of ( Dependabot ::GithubActions ::Package ::PackageDetailsFetcher )
419- . to receive ( :fetch_tag_and_release_date ) . and_raise ( StandardError , "git error" )
419+ mock_fetcher = instance_double ( Dependabot ::GithubActions ::Package ::PackageDetailsFetcher )
420+ allow ( mock_fetcher ) . to receive ( :fetch_tag_and_release_date ) . and_raise ( StandardError , "git error" )
421+ allow ( finder ) . to receive ( :package_details_fetcher ) . and_return ( mock_fetcher )
420422 end
421423
422424 it "handles error gracefully and returns empty array" do
You can’t perform that action at this time.
0 commit comments