dependabot-common 0.253.0 → 0.255.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/clients/azure.rb +1 -1
- data/lib/dependabot/clients/codecommit.rb +1 -1
- data/lib/dependabot/metadata_finders/base/changelog_finder.rb +3 -10
- data/lib/dependabot/metadata_finders/base.rb +1 -1
- data/lib/dependabot/pull_request_creator/bitbucket.rb +2 -2
- data/lib/dependabot/pull_request_creator/codecommit.rb +2 -3
- data/lib/dependabot/pull_request_creator/message_builder.rb +12 -5
- data/lib/dependabot/shared_helpers.rb +3 -0
- data/lib/dependabot.rb +1 -1
- metadata +30 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8677d4ccffaf67ae0961030d344141dc1162f4a5e384621092887631bb5b765d
|
4
|
+
data.tar.gz: f9ac2a184fee124350bbe3cda9fb396e2a4b3db892c7508ccc2c0d4906e04d20
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9921b952d5f129b3ca1a35176c568beffc57cb58ab0c369e0e10d874a8ff1085fc6fe03c5969ff2d99478f8f62948348969e34e4d7b60da423d8e7dec61eb98
|
7
|
+
data.tar.gz: 30159fe335de6438838784aec81877aaa2bdb1a13c6c00dfc25058d25bbe201779b1eac76678aaf6c92ae7a8ddc8e2e6171b37bea9c3647f5b457725e8d06889
|
@@ -176,7 +176,7 @@ module Dependabot
|
|
176
176
|
base_commit: String,
|
177
177
|
commit_message: String,
|
178
178
|
files: T::Array[Dependabot::DependencyFile],
|
179
|
-
author_details: T.nilable(T::Hash[
|
179
|
+
author_details: T.nilable(T::Hash[Symbol, String])
|
180
180
|
)
|
181
181
|
.returns(T.untyped)
|
182
182
|
end
|
@@ -53,6 +53,8 @@ module Dependabot
|
|
53
53
|
@dependency = dependency
|
54
54
|
@credentials = credentials
|
55
55
|
@suggested_changelog_url = suggested_changelog_url
|
56
|
+
# strip fragment from URL, if present
|
57
|
+
@suggested_changelog_url = @suggested_changelog_url&.split("#")&.first
|
56
58
|
|
57
59
|
@new_version = T.let(nil, T.nilable(String))
|
58
60
|
@changelog_from_suggested_url = T.let(nil, T.untyped)
|
@@ -127,16 +129,7 @@ module Dependabot
|
|
127
129
|
suggested_source_client = github_client_for_source(T.must(suggested_source))
|
128
130
|
tmp_files = T.unsafe(suggested_source_client).contents(suggested_source&.repo, opts)
|
129
131
|
|
130
|
-
filename = T.must(T.must(suggested_changelog_url).split("/").last)
|
131
|
-
|
132
|
-
# If the suggested source points to a specific directory
|
133
|
-
# then we will receive a hash for just the changelog file
|
134
|
-
if suggested_source&.directory && tmp_files[:name] == filename
|
135
|
-
return @changelog_from_suggested_url = tmp_files
|
136
|
-
end
|
137
|
-
|
138
|
-
# Otherwise we will get back an array of hashes representing the files
|
139
|
-
# in the root directory and we need to find the changelog
|
132
|
+
filename = T.must(T.must(suggested_changelog_url).split("/").last)
|
140
133
|
@changelog_from_suggested_url =
|
141
134
|
tmp_files.find { |f| f.name == filename }
|
142
135
|
rescue Octokit::NotFound, Octokit::UnavailableForLegalReasons
|
@@ -197,12 +197,11 @@ module Dependabot
|
|
197
197
|
|
198
198
|
sig { void }
|
199
199
|
def create_commit
|
200
|
-
|
201
|
-
author = nil unless author&.any?
|
200
|
+
author_name = author_details&.fetch(:name)
|
202
201
|
|
203
202
|
codecommit_client_for_source.create_commit(
|
204
203
|
branch_name,
|
205
|
-
|
204
|
+
author_name,
|
206
205
|
base_commit,
|
207
206
|
commit_message,
|
208
207
|
files
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# typed: strict
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require "time"
|
4
5
|
require "pathname"
|
5
6
|
require "sorbet-runtime"
|
6
7
|
|
@@ -126,7 +127,7 @@ module Dependabot
|
|
126
127
|
|
127
128
|
truncate_pr_message(msg)
|
128
129
|
rescue StandardError => e
|
129
|
-
|
130
|
+
suppress_error("PR message", e)
|
130
131
|
suffixed_pr_message_header + prefixed_pr_message_footer
|
131
132
|
end
|
132
133
|
|
@@ -161,7 +162,7 @@ module Dependabot
|
|
161
162
|
message += "\n\n" + T.must(message_trailers) if message_trailers
|
162
163
|
message
|
163
164
|
rescue StandardError => e
|
164
|
-
|
165
|
+
suppress_error("commit message", e)
|
165
166
|
message = commit_subject
|
166
167
|
message += "\n\n" + T.must(message_trailers) if message_trailers
|
167
168
|
message
|
@@ -275,7 +276,7 @@ module Dependabot
|
|
275
276
|
def pr_name_prefix
|
276
277
|
pr_name_prefixer.pr_name_prefix
|
277
278
|
rescue StandardError => e
|
278
|
-
|
279
|
+
suppress_error("PR name", e)
|
279
280
|
""
|
280
281
|
end
|
281
282
|
|
@@ -735,9 +736,9 @@ module Dependabot
|
|
735
736
|
# Return an empty string if no valid ignore conditions after filtering
|
736
737
|
return "" if valid_ignore_conditions.empty?
|
737
738
|
|
738
|
-
# Sort them by updated_at
|
739
|
+
# Sort them by updated_at, taking the latest 20
|
739
740
|
sorted_ignore_conditions = valid_ignore_conditions.sort_by do |ic|
|
740
|
-
ic["
|
741
|
+
ic["updated-at"].nil? ? Time.at(0).iso8601 : T.must(ic["updated-at"])
|
741
742
|
end.last(20)
|
742
743
|
|
743
744
|
# Map each condition to a row string
|
@@ -883,6 +884,12 @@ module Dependabot
|
|
883
884
|
T.nilable(String)
|
884
885
|
)
|
885
886
|
end
|
887
|
+
|
888
|
+
sig { params(method: String, err: StandardError).void }
|
889
|
+
def suppress_error(method, err)
|
890
|
+
Dependabot.logger.error("Error while generating #{method}: #{err.message}")
|
891
|
+
Dependabot.logger.error(err.backtrace&.join("\n"))
|
892
|
+
end
|
886
893
|
end
|
887
894
|
end
|
888
895
|
end
|
@@ -405,6 +405,9 @@ module Dependabot
|
|
405
405
|
stderr_to_stdout: true)
|
406
406
|
start = Time.now
|
407
407
|
cmd = allow_unsafe_shell_command ? command : escape_command(command)
|
408
|
+
|
409
|
+
puts cmd if ENV["DEBUG_HELPERS"] == "true"
|
410
|
+
|
408
411
|
if stderr_to_stdout
|
409
412
|
stdout, process = Open3.capture2e(env || {}, cmd)
|
410
413
|
else
|
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.255.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-
|
11
|
+
date: 2024-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-codecommit
|
@@ -281,7 +281,7 @@ dependencies:
|
|
281
281
|
version: 1.1.2
|
282
282
|
- - "<"
|
283
283
|
- !ruby/object:Gem::Version
|
284
|
-
version: '
|
284
|
+
version: '4.0'
|
285
285
|
type: :runtime
|
286
286
|
prerelease: false
|
287
287
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -291,21 +291,21 @@ dependencies:
|
|
291
291
|
version: 1.1.2
|
292
292
|
- - "<"
|
293
293
|
- !ruby/object:Gem::Version
|
294
|
-
version: '
|
294
|
+
version: '4.0'
|
295
295
|
- !ruby/object:Gem::Dependency
|
296
296
|
name: debug
|
297
297
|
requirement: !ruby/object:Gem::Requirement
|
298
298
|
requirements:
|
299
299
|
- - "~>"
|
300
300
|
- !ruby/object:Gem::Version
|
301
|
-
version: 1.
|
301
|
+
version: 1.9.2
|
302
302
|
type: :development
|
303
303
|
prerelease: false
|
304
304
|
version_requirements: !ruby/object:Gem::Requirement
|
305
305
|
requirements:
|
306
306
|
- - "~>"
|
307
307
|
- !ruby/object:Gem::Version
|
308
|
-
version: 1.
|
308
|
+
version: 1.9.2
|
309
309
|
- !ruby/object:Gem::Dependency
|
310
310
|
name: gpgme
|
311
311
|
requirement: !ruby/object:Gem::Requirement
|
@@ -382,56 +382,70 @@ dependencies:
|
|
382
382
|
requirements:
|
383
383
|
- - "~>"
|
384
384
|
- !ruby/object:Gem::Version
|
385
|
-
version: 1.
|
385
|
+
version: 1.63.2
|
386
386
|
type: :development
|
387
387
|
prerelease: false
|
388
388
|
version_requirements: !ruby/object:Gem::Requirement
|
389
389
|
requirements:
|
390
390
|
- - "~>"
|
391
391
|
- !ruby/object:Gem::Version
|
392
|
-
version: 1.
|
392
|
+
version: 1.63.2
|
393
393
|
- !ruby/object:Gem::Dependency
|
394
394
|
name: rubocop-performance
|
395
395
|
requirement: !ruby/object:Gem::Requirement
|
396
396
|
requirements:
|
397
397
|
- - "~>"
|
398
398
|
- !ruby/object:Gem::Version
|
399
|
-
version: 1.
|
399
|
+
version: 1.21.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.21.0
|
407
407
|
- !ruby/object:Gem::Dependency
|
408
408
|
name: rubocop-rspec
|
409
409
|
requirement: !ruby/object:Gem::Requirement
|
410
410
|
requirements:
|
411
411
|
- - "~>"
|
412
412
|
- !ruby/object:Gem::Version
|
413
|
-
version: 2.
|
413
|
+
version: 2.29.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: 2.
|
420
|
+
version: 2.29.1
|
421
421
|
- !ruby/object:Gem::Dependency
|
422
422
|
name: rubocop-sorbet
|
423
423
|
requirement: !ruby/object:Gem::Requirement
|
424
424
|
requirements:
|
425
425
|
- - "~>"
|
426
426
|
- !ruby/object:Gem::Version
|
427
|
-
version: 0.
|
427
|
+
version: 0.8.1
|
428
|
+
type: :development
|
429
|
+
prerelease: false
|
430
|
+
version_requirements: !ruby/object:Gem::Requirement
|
431
|
+
requirements:
|
432
|
+
- - "~>"
|
433
|
+
- !ruby/object:Gem::Version
|
434
|
+
version: 0.8.1
|
435
|
+
- !ruby/object:Gem::Dependency
|
436
|
+
name: simplecov
|
437
|
+
requirement: !ruby/object:Gem::Requirement
|
438
|
+
requirements:
|
439
|
+
- - "~>"
|
440
|
+
- !ruby/object:Gem::Version
|
441
|
+
version: 0.22.0
|
428
442
|
type: :development
|
429
443
|
prerelease: false
|
430
444
|
version_requirements: !ruby/object:Gem::Requirement
|
431
445
|
requirements:
|
432
446
|
- - "~>"
|
433
447
|
- !ruby/object:Gem::Version
|
434
|
-
version: 0.
|
448
|
+
version: 0.22.0
|
435
449
|
- !ruby/object:Gem::Dependency
|
436
450
|
name: turbo_tests
|
437
451
|
requirement: !ruby/object:Gem::Requirement
|
@@ -583,7 +597,7 @@ licenses:
|
|
583
597
|
- Nonstandard
|
584
598
|
metadata:
|
585
599
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
586
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
600
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.255.0
|
587
601
|
post_install_message:
|
588
602
|
rdoc_options: []
|
589
603
|
require_paths:
|
@@ -599,7 +613,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
599
613
|
- !ruby/object:Gem::Version
|
600
614
|
version: 3.3.7
|
601
615
|
requirements: []
|
602
|
-
rubygems_version: 3.
|
616
|
+
rubygems_version: 3.5.9
|
603
617
|
signing_key:
|
604
618
|
specification_version: 4
|
605
619
|
summary: Shared code used across Dependabot Core
|