dependabot-common 0.281.0 → 0.283.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: 23990d60058d974f2358748f5a1a9cebeeb9b0aa41bcff87c8d5c0a82f162639
4
+ data.tar.gz: 2f8c3980648d02dc8bba63d1b8dde5493293245366d651343a8fac785f65b7f2
5
5
  SHA512:
6
- metadata.gz: 33ce2db75a34f97dbc9c55a45f27b16204992363e9c2a75c5e56902d9e6287dce9d677b877ec8736de792a56307a4748124fb2ca4ace6e1e74e2e5c95c6fff69
7
- data.tar.gz: be75d245fea75411d2d4db23e71aabed5a97ca598957b28acb4b857bf723ee34c89c397407bde397d67c8356d043c388a9aecffc901a7fdc36cffa32872d88ea
6
+ metadata.gz: 2dd34fccf3d316a0b5b9295a0cdf05be1b7fd577a6cc8701ccb91084bef512a393d1347059ccc0bc2c4affeacaf7e6d2e2b9d4c4432ff111ce32597b50a6ba7e
7
+ data.tar.gz: 2f8de1d6775ccbd267c25ab3aff79a00247e21ab57a316091cc5419e1fde50fcdd1f5f376aa1954f8aa02e56e105106f4229bc9df98e152df9266013bc7c027a
@@ -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.283.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.283.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-31 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.283.0
618
618
  post_install_message:
619
619
  rdoc_options: []
620
620
  require_paths: