dependabot-common 0.349.0 → 0.350.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fb3951f9fad81d40a6feeee975ecedbef2032bfdab19f3d9813c6ea1a44df37c
4
- data.tar.gz: 47d5909881a4ff68f1ddc1964f468beee8024783c39a548b2ab24e356d8e3265
3
+ metadata.gz: e3e7d8b7801d11a969b187ac545af8c704d7883830afd5d8670463ff7c936df3
4
+ data.tar.gz: 23e68319bd675a9347b35ffedc107823f71c8de6054e18ecf2a91a4a1d3ce2e5
5
5
  SHA512:
6
- metadata.gz: e513a887485738625d9233d2db264449e4765ac8ff985344bfd21dc1c94e8a585a22e12075f4aa43392dbdd16b5e08328889daa8b606e2af5b4c68a0541f013e
7
- data.tar.gz: 5a8cd4f9727aacb10b0df076e5841bbf101896d7c30701cb4171b8ec687ed5012bcbfd18514c4f8e6862912cad76a2dc77c9d11cddd18bda4212fc014ca85f65
6
+ metadata.gz: ecbec2eb7cbe4a37495a619f814e76401a49dadcc6abde2d412a5d2e8f1347361d957d44f3020a6ca73a2035850c241e345581674256393a3f2bed506fb643e9
7
+ data.tar.gz: db8dbaf3c46e4286aed04a7c1d39ba66b192696b4547beb875a35dae9cfa01ae4371c020d5a4128160daa57d147f2227c6a034cb1dedf3a12942dd4dd8ed7895
@@ -180,7 +180,7 @@ module Dependabot
180
180
  sig { params(files: T::Array[T.untyped]).returns(T.untyped) }
181
181
  def select_best_changelog(files)
182
182
  CHANGELOG_NAMES.each do |name|
183
- candidates = files.select { |f| f.name =~ /#{name}/i }
183
+ candidates = files.select { |f| f.name =~ /\A#{name}/i }
184
184
  file = candidates.first if candidates.one?
185
185
  file ||=
186
186
  candidates.find do |f|
@@ -158,6 +158,26 @@ module Dependabot
158
158
  if releases.count > filtered.count
159
159
  Dependabot.logger.info("Filtered out #{releases.count - filtered.count} versions due to cooldown")
160
160
  end
161
+
162
+ # If all releases were filtered out due to cooldown and we have a current version, use it as fallback
163
+ if filtered.empty? && !releases.empty? && dependency.version
164
+ current_version_str = dependency.version
165
+
166
+ Dependabot.logger.info(
167
+ "All versions filtered by cooldown for #{dependency.name}, " \
168
+ "falling back to current version #{current_version_str}"
169
+ )
170
+
171
+ # Create a PackageRelease for the current version
172
+ current_version = version_class.new(current_version_str)
173
+ current_release = Dependabot::Package::PackageRelease.new(
174
+ version: current_version,
175
+ released_at: nil,
176
+ tag: nil
177
+ )
178
+ return [current_release]
179
+ end
180
+
161
181
  filtered
162
182
  end
163
183
 
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.349.0"
5
+ VERSION = "0.350.0"
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.349.0
4
+ version: 0.350.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
@@ -629,7 +629,7 @@ licenses:
629
629
  - MIT
630
630
  metadata:
631
631
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
632
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.349.0
632
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.350.0
633
633
  rdoc_options: []
634
634
  require_paths:
635
635
  - lib