dependabot-common 0.280.0 → 0.282.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2ae924a2cf736a7ed5602dfe97f4a3b55005de4ea62414cc3873a593b22e5b24
4
- data.tar.gz: 610e19d87470728a685020743597e87495f7d61a7ae29b6e6076b0530bd5dc5b
3
+ metadata.gz: bab04f92d1012d9c1c6ad35a8a7d1dd1fc6c44871574575fca3a194d77e09d91
4
+ data.tar.gz: 2e55d5191c95ad599cb84cb2a5da47afce5faca28401cb259e87ccae89e0dcfd
5
5
  SHA512:
6
- metadata.gz: 45eb26b84f90aa08d55407334ca8be24957d07d0f14d5d31eceb4a6d7e9f1d20b8c086f42fad5cabd26f4bc8e47b4c0228db16fb63cb033738e3a55c5c980951
7
- data.tar.gz: 6412e967b632dd03177156b5f744ebcf8a014712832e62a89eb3cad362cbe1e3f14e570516d3201c26813346dd61744e58203fd7a2b9c7a206bcb89429388fd7
6
+ metadata.gz: bce2900b9b4f729e4cc8696636b13e33aef9b6791d727070d88b33e4909437811a1baea39b09272911a5929c4addd002e8177e6b6ad0061c43c1901805c9da13
7
+ data.tar.gz: 2dd3ba8fdf0810637da059b6587658fc6cb0800defa344c3bf724286f2cc63146af79fbd27e6dc0509ef85517e433b1479c13607bbf305ff36e0e49d32b5a89c
@@ -235,7 +235,7 @@ module Dependabot
235
235
 
236
236
  uri.scheme = "https" if uri.scheme != "http"
237
237
 
238
- if !uri.password && cred && cred.fetch("username", nil) && cred.fetch("password", nil)
238
+ if !uri.password && cred&.fetch("username", nil) && cred.fetch("password", nil)
239
239
  # URI doesn't have authentication details, but we have credentials
240
240
  uri.user = URI.encode_www_form_component(cred["username"])
241
241
  uri.password = URI.encode_www_form_component(cred["password"])
@@ -75,7 +75,7 @@ module Dependabot
75
75
  releases_with_dependency_name =
76
76
  releases
77
77
  .reject { |r| r.tag_name.nil? }
78
- .select { |r| r.tag_name.downcase.include?(dep_prefix) }
78
+ .select { |r| r.tag_name.start_with?(dep_prefix) }
79
79
 
80
80
  return releases unless releases_with_dependency_name.any?
81
81
 
@@ -83,6 +83,9 @@ module Dependabot
83
83
 
84
84
  sig { params(ref: String).returns(String) }
85
85
  def dedup_existing_branches(ref)
86
+ Dependabot.logger.debug(
87
+ "Dependabot::PullRequestCreator::dedup_existing_branches::ref : #{ref}"
88
+ )
86
89
  return ref unless existing_branches.include?(ref)
87
90
 
88
91
  i = 1
@@ -92,6 +95,10 @@ module Dependabot
92
95
  new_ref = "#{ref}-#{i}"
93
96
  end
94
97
 
98
+ Dependabot.logger.debug(
99
+ "Dependabot::PullRequestCreator::dedup_existing_branches::new_ref : #{new_ref}"
100
+ )
101
+
95
102
  new_ref
96
103
  end
97
104
 
@@ -77,6 +77,12 @@ module Dependabot
77
77
 
78
78
  sig { returns(Dependabot::PullRequestCreator::BranchNamer::Base) }
79
79
  def strategy
80
+ if Dependabot::Experiments.enabled?(:dedup_branch_names) && existing_branches
81
+ Dependabot.logger.debug(
82
+ "Dependabot::PullRequestCreator::strategy : #{existing_branches}"
83
+ )
84
+ end
85
+
80
86
  @strategy ||= T.let(
81
87
  if dependency_group.nil?
82
88
  SoloStrategy.new(
@@ -396,6 +396,12 @@ module Dependabot
396
396
 
397
397
  sig { returns(Dependabot::PullRequestCreator::BranchNamer) }
398
398
  def branch_namer
399
+ if Dependabot::Experiments.enabled?(:dedup_branch_names) && existing_branches
400
+ Dependabot.logger.debug(
401
+ "Dependabot::PullRequestCreator::branch_namer : #{existing_branches}"
402
+ )
403
+ end
404
+
399
405
  @branch_namer ||= T.let(
400
406
  BranchNamer.new(
401
407
  dependencies: dependencies,
@@ -52,7 +52,7 @@ module Dependabot
52
52
  def ignored_minor_versions
53
53
  parts = to_semver.split(".")
54
54
  version_parts = parts.fill("0", parts.length...2)
55
- lower_parts = version_parts.first(1) + [version_parts[1].to_i + 1] + ["a"]
55
+ lower_parts = version_parts.first(1) + [version_parts[1].to_i + 1] + [lowest_prerelease_suffix]
56
56
  upper_parts = version_parts.first(0) + [version_parts[0].to_i + 1]
57
57
  lower_bound = ">= #{lower_parts.join('.')}"
58
58
  upper_bound = "< #{upper_parts.join('.')}"
@@ -63,10 +63,15 @@ module Dependabot
63
63
  sig { overridable.returns(T::Array[String]) }
64
64
  def ignored_major_versions
65
65
  version_parts = to_semver.split(".")
66
- lower_parts = [version_parts[0].to_i + 1] + ["a"]
66
+ lower_parts = [version_parts[0].to_i + 1] + [lowest_prerelease_suffix]
67
67
  lower_bound = ">= #{lower_parts.join('.')}"
68
68
 
69
69
  [lower_bound]
70
70
  end
71
+
72
+ sig { returns(String) }
73
+ def lowest_prerelease_suffix
74
+ "a"
75
+ end
71
76
  end
72
77
  end
data/lib/dependabot.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Dependabot
5
- VERSION = "0.280.0"
5
+ VERSION = "0.282.0"
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dependabot-common
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.280.0
4
+ version: 0.282.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-10 00:00:00.000000000 Z
11
+ date: 2024-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-codecommit
@@ -396,28 +396,28 @@ dependencies:
396
396
  requirements:
397
397
  - - "~>"
398
398
  - !ruby/object:Gem::Version
399
- version: 1.65.0
399
+ version: 1.67.0
400
400
  type: :development
401
401
  prerelease: false
402
402
  version_requirements: !ruby/object:Gem::Requirement
403
403
  requirements:
404
404
  - - "~>"
405
405
  - !ruby/object:Gem::Version
406
- version: 1.65.0
406
+ version: 1.67.0
407
407
  - !ruby/object:Gem::Dependency
408
408
  name: rubocop-performance
409
409
  requirement: !ruby/object:Gem::Requirement
410
410
  requirements:
411
411
  - - "~>"
412
412
  - !ruby/object:Gem::Version
413
- version: 1.21.0
413
+ version: 1.22.1
414
414
  type: :development
415
415
  prerelease: false
416
416
  version_requirements: !ruby/object:Gem::Requirement
417
417
  requirements:
418
418
  - - "~>"
419
419
  - !ruby/object:Gem::Version
420
- version: 1.21.0
420
+ version: 1.22.1
421
421
  - !ruby/object:Gem::Dependency
422
422
  name: rubocop-rspec
423
423
  requirement: !ruby/object:Gem::Requirement
@@ -614,8 +614,8 @@ licenses:
614
614
  - MIT
615
615
  metadata:
616
616
  bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
617
- changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.280.0
618
- post_install_message:
617
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.282.0
618
+ post_install_message:
619
619
  rdoc_options: []
620
620
  require_paths:
621
621
  - lib
@@ -631,7 +631,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
631
631
  version: 3.3.7
632
632
  requirements: []
633
633
  rubygems_version: 3.5.9
634
- signing_key:
634
+ signing_key:
635
635
  specification_version: 4
636
636
  summary: Shared code used across Dependabot Core
637
637
  test_files: []