dependabot-common 0.295.0 → 0.296.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/config/file.rb +1 -0
- data/lib/dependabot/errors.rb +40 -0
- data/lib/dependabot.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7931534498ba21a6ffa1ab7b284ce7a17351208b8257966ab4d28b9b534d45fe
|
4
|
+
data.tar.gz: d1fa9e5c8dc06dd38421780800456779e3db7dd07825a347bf86e7f63ebb631b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1d0ed1ec43fd93a6ad2dabc7fda04c59176f2caf7aea307441d7df870c46bb61d36c8b20f7c0019ba23838d1ee04ab1d5bf7846d7d7a3649bc3c2fe4d2a8c20
|
7
|
+
data.tar.gz: 5e8045a62309fa8c4bd43a7fedca2816296074fa6eac9caf3a3163c02857b1d7db49a3c79db87494774981cdf4b4054c10c68da02ad8d2eb23369c495005d71a
|
data/lib/dependabot/errors.rb
CHANGED
@@ -4,6 +4,7 @@
|
|
4
4
|
require "sorbet-runtime"
|
5
5
|
require "dependabot/utils"
|
6
6
|
|
7
|
+
# rubocop:disable Metrics/ModuleLength
|
7
8
|
module Dependabot
|
8
9
|
extend T::Sig
|
9
10
|
|
@@ -21,6 +22,7 @@ module Dependabot
|
|
21
22
|
end
|
22
23
|
|
23
24
|
# rubocop:disable Metrics/MethodLength
|
25
|
+
# rubocop:disable Metrics/CyclomaticComplexity
|
24
26
|
sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
25
27
|
def self.fetcher_error_details(error)
|
26
28
|
case error
|
@@ -90,6 +92,11 @@ module Dependabot
|
|
90
92
|
"error-type": "private_source_authentication_failure",
|
91
93
|
"error-detail": { source: error.source }
|
92
94
|
}
|
95
|
+
when Dependabot::PrivateSourceBadResponse
|
96
|
+
{
|
97
|
+
"error-type": "private_source_bad_response",
|
98
|
+
"error-detail": { source: error.source }
|
99
|
+
}
|
93
100
|
when Octokit::Unauthorized
|
94
101
|
{ "error-type": "octokit_unauthorized" }
|
95
102
|
when Octokit::ServerError
|
@@ -113,6 +120,7 @@ module Dependabot
|
|
113
120
|
}
|
114
121
|
end
|
115
122
|
end
|
123
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
116
124
|
|
117
125
|
sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
118
126
|
def self.parser_error_details(error)
|
@@ -167,6 +175,11 @@ module Dependabot
|
|
167
175
|
"error-type": "private_source_authentication_failure",
|
168
176
|
"error-detail": { source: error.source }
|
169
177
|
}
|
178
|
+
when Dependabot::PrivateSourceBadResponse
|
179
|
+
{
|
180
|
+
"error-type": "private_source_bad_response",
|
181
|
+
"error-detail": { source: error.source }
|
182
|
+
}
|
170
183
|
when Dependabot::GitDependenciesNotReachable
|
171
184
|
{
|
172
185
|
"error-type": "git_dependencies_not_reachable",
|
@@ -238,6 +251,11 @@ module Dependabot
|
|
238
251
|
"file-path": error.file_path
|
239
252
|
}
|
240
253
|
}
|
254
|
+
when Dependabot::DependencyFileContentNotChanged
|
255
|
+
{
|
256
|
+
"error-type": "dependency_file_content_not_changed",
|
257
|
+
"error-detail": { message: error.message }
|
258
|
+
}
|
241
259
|
when Dependabot::ToolVersionNotSupported
|
242
260
|
{
|
243
261
|
"error-type": "tool_version_not_supported",
|
@@ -262,6 +280,11 @@ module Dependabot
|
|
262
280
|
"error-type": "private_source_authentication_failure",
|
263
281
|
"error-detail": { source: error.source }
|
264
282
|
}
|
283
|
+
when Dependabot::PrivateSourceBadResponse
|
284
|
+
{
|
285
|
+
"error-type": "private_source_bad_response",
|
286
|
+
"error-detail": { source: error.source }
|
287
|
+
}
|
265
288
|
when Dependabot::DependencyNotFound
|
266
289
|
{
|
267
290
|
"error-type": "dependency_not_found",
|
@@ -623,6 +646,8 @@ module Dependabot
|
|
623
646
|
|
624
647
|
class DependencyFileNotSupported < DependabotError; end
|
625
648
|
|
649
|
+
class DependencyFileContentNotChanged < DependabotError; end
|
650
|
+
|
626
651
|
class BadRequirementError < Gem::Requirement::BadRequirementError; end
|
627
652
|
|
628
653
|
#######################
|
@@ -645,6 +670,20 @@ module Dependabot
|
|
645
670
|
end
|
646
671
|
end
|
647
672
|
|
673
|
+
class PrivateSourceBadResponse < DependabotError
|
674
|
+
extend T::Sig
|
675
|
+
|
676
|
+
sig { returns(String) }
|
677
|
+
attr_reader :source
|
678
|
+
|
679
|
+
sig { params(source: T.nilable(String)).void }
|
680
|
+
def initialize(source)
|
681
|
+
@source = T.let(sanitize_source(T.must(source)), String)
|
682
|
+
msg = "Bad response error while accessing source: #{@source}"
|
683
|
+
super(msg)
|
684
|
+
end
|
685
|
+
end
|
686
|
+
|
648
687
|
class PrivateSourceTimedOut < DependabotError
|
649
688
|
extend T::Sig
|
650
689
|
|
@@ -846,3 +885,4 @@ module Dependabot
|
|
846
885
|
end
|
847
886
|
end
|
848
887
|
end
|
888
|
+
# rubocop:enable Metrics/ModuleLength
|
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.296.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-02-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-codecommit
|
@@ -615,7 +615,7 @@ licenses:
|
|
615
615
|
- MIT
|
616
616
|
metadata:
|
617
617
|
bug_tracker_uri: https://github.com/dependabot/dependabot-core/issues
|
618
|
-
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.
|
618
|
+
changelog_uri: https://github.com/dependabot/dependabot-core/releases/tag/v0.296.0
|
619
619
|
post_install_message:
|
620
620
|
rdoc_options: []
|
621
621
|
require_paths:
|