dependabot-common 0.281.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: 8cf43bf846f381acbdd67fdc881b863d9f121fbea860830652d103d33969de56
4
- data.tar.gz: 4cccc62a8f19b7109af5db7b20570868a9adfe792e2ffcec9547eb7e7940eba1
3
+ metadata.gz: bab04f92d1012d9c1c6ad35a8a7d1dd1fc6c44871574575fca3a194d77e09d91
4
+ data.tar.gz: 2e55d5191c95ad599cb84cb2a5da47afce5faca28401cb259e87ccae89e0dcfd
5
5
  SHA512:
6
- metadata.gz: 33ce2db75a34f97dbc9c55a45f27b16204992363e9c2a75c5e56902d9e6287dce9d677b877ec8736de792a56307a4748124fb2ca4ace6e1e74e2e5c95c6fff69
7
- data.tar.gz: be75d245fea75411d2d4db23e71aabed5a97ca598957b28acb4b857bf723ee34c89c397407bde397d67c8356d043c388a9aecffc901a7fdc36cffa32872d88ea
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"])
@@ -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.281.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.281.0
4
+ version: 0.282.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dependabot
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-10-17 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,7 +614,7 @@ 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.281.0
617
+ changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.282.0
618
618
  post_install_message:
619
619
  rdoc_options: []
620
620
  require_paths: