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 +4 -4
- data/lib/dependabot/git_metadata_fetcher.rb +1 -1
- data/lib/dependabot/metadata_finders/base/release_finder.rb +1 -1
- data/lib/dependabot/pull_request_creator/branch_namer/base.rb +7 -0
- data/lib/dependabot/pull_request_creator/branch_namer.rb +6 -0
- data/lib/dependabot/pull_request_creator.rb +6 -0
- data/lib/dependabot/version.rb +7 -2
- data/lib/dependabot.rb +1 -1
- metadata +10 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bab04f92d1012d9c1c6ad35a8a7d1dd1fc6c44871574575fca3a194d77e09d91
|
4
|
+
data.tar.gz: 2e55d5191c95ad599cb84cb2a5da47afce5faca28401cb259e87ccae89e0dcfd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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,
|
data/lib/dependabot/version.rb
CHANGED
@@ -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] + [
|
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] + [
|
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
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.
|
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-
|
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.
|
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.
|
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.
|
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.
|
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.
|
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: []
|