dependabot-common 0.294.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 +52 -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
|
@@ -85,6 +87,16 @@ module Dependabot
|
|
85
87
|
"error-type": "path_dependencies_not_reachable",
|
86
88
|
"error-detail": { dependencies: error.dependencies }
|
87
89
|
}
|
90
|
+
when Dependabot::PrivateSourceAuthenticationFailure
|
91
|
+
{
|
92
|
+
"error-type": "private_source_authentication_failure",
|
93
|
+
"error-detail": { source: error.source }
|
94
|
+
}
|
95
|
+
when Dependabot::PrivateSourceBadResponse
|
96
|
+
{
|
97
|
+
"error-type": "private_source_bad_response",
|
98
|
+
"error-detail": { source: error.source }
|
99
|
+
}
|
88
100
|
when Octokit::Unauthorized
|
89
101
|
{ "error-type": "octokit_unauthorized" }
|
90
102
|
when Octokit::ServerError
|
@@ -108,6 +120,7 @@ module Dependabot
|
|
108
120
|
}
|
109
121
|
end
|
110
122
|
end
|
123
|
+
# rubocop:enable Metrics/CyclomaticComplexity
|
111
124
|
|
112
125
|
sig { params(error: StandardError).returns(T.nilable(T::Hash[Symbol, T.untyped])) }
|
113
126
|
def self.parser_error_details(error)
|
@@ -162,6 +175,11 @@ module Dependabot
|
|
162
175
|
"error-type": "private_source_authentication_failure",
|
163
176
|
"error-detail": { source: error.source }
|
164
177
|
}
|
178
|
+
when Dependabot::PrivateSourceBadResponse
|
179
|
+
{
|
180
|
+
"error-type": "private_source_bad_response",
|
181
|
+
"error-detail": { source: error.source }
|
182
|
+
}
|
165
183
|
when Dependabot::GitDependenciesNotReachable
|
166
184
|
{
|
167
185
|
"error-type": "git_dependencies_not_reachable",
|
@@ -215,6 +233,11 @@ module Dependabot
|
|
215
233
|
"file-path": error.file_path
|
216
234
|
}
|
217
235
|
}
|
236
|
+
when Dependabot::DependencyFileNotSupported
|
237
|
+
{
|
238
|
+
"error-type": "dependency_file_not_supported",
|
239
|
+
"error-detail": { message: error.message }
|
240
|
+
}
|
218
241
|
when Dependabot::GitDependenciesNotReachable
|
219
242
|
{
|
220
243
|
"error-type": "git_dependencies_not_reachable",
|
@@ -228,6 +251,11 @@ module Dependabot
|
|
228
251
|
"file-path": error.file_path
|
229
252
|
}
|
230
253
|
}
|
254
|
+
when Dependabot::DependencyFileContentNotChanged
|
255
|
+
{
|
256
|
+
"error-type": "dependency_file_content_not_changed",
|
257
|
+
"error-detail": { message: error.message }
|
258
|
+
}
|
231
259
|
when Dependabot::ToolVersionNotSupported
|
232
260
|
{
|
233
261
|
"error-type": "tool_version_not_supported",
|
@@ -252,6 +280,11 @@ module Dependabot
|
|
252
280
|
"error-type": "private_source_authentication_failure",
|
253
281
|
"error-detail": { source: error.source }
|
254
282
|
}
|
283
|
+
when Dependabot::PrivateSourceBadResponse
|
284
|
+
{
|
285
|
+
"error-type": "private_source_bad_response",
|
286
|
+
"error-detail": { source: error.source }
|
287
|
+
}
|
255
288
|
when Dependabot::DependencyNotFound
|
256
289
|
{
|
257
290
|
"error-type": "dependency_not_found",
|
@@ -611,6 +644,10 @@ module Dependabot
|
|
611
644
|
|
612
645
|
class DependencyFileNotResolvable < DependabotError; end
|
613
646
|
|
647
|
+
class DependencyFileNotSupported < DependabotError; end
|
648
|
+
|
649
|
+
class DependencyFileContentNotChanged < DependabotError; end
|
650
|
+
|
614
651
|
class BadRequirementError < Gem::Requirement::BadRequirementError; end
|
615
652
|
|
616
653
|
#######################
|
@@ -633,6 +670,20 @@ module Dependabot
|
|
633
670
|
end
|
634
671
|
end
|
635
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
|
+
|
636
687
|
class PrivateSourceTimedOut < DependabotError
|
637
688
|
extend T::Sig
|
638
689
|
|
@@ -834,3 +885,4 @@ module Dependabot
|
|
834
885
|
end
|
835
886
|
end
|
836
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:
|