dependabot-common 0.156.3 → 0.156.7
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 +8 -0
- data/lib/dependabot/file_fetchers/base.rb +22 -5
- data/lib/dependabot/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01582f4e6af1cd2526988f23545637527bc5bfaf8860bc4c5fd964c71a1da905'
|
4
|
+
data.tar.gz: 9a2b2d63bb77138f8ef1cd278403c605bdc559b64fceca90ef3a4cce7ef293a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96dcdabb126fe52488da7faa1de7121b092a88bcc06fd30694adeca5d8bb6ccdea9f594f013b42aad916c1c74e6337f40273ceb3923b748bcfb0635a38ff16b6
|
7
|
+
data.tar.gz: 7154b80c394c70d49930d49c34a03ddfa34e0c1c76d8e9048644836ceca055b6bc64fecd1edeffbf71504e1eb6ed02778d34eef66d5818c7e3657829ba67c23e
|
@@ -14,6 +14,10 @@ module Dependabot
|
|
14
14
|
|
15
15
|
class BadGateway < StandardError; end
|
16
16
|
|
17
|
+
class Unauthorized < StandardError; end
|
18
|
+
|
19
|
+
class Forbidden < StandardError; end
|
20
|
+
|
17
21
|
RETRYABLE_ERRORS = [InternalServerError, BadGateway, ServiceNotAvailable].freeze
|
18
22
|
|
19
23
|
MAX_PR_DESCRIPTION_LENGTH = 3999
|
@@ -228,6 +232,8 @@ module Dependabot
|
|
228
232
|
raise ServiceNotAvailable if response.status == 503
|
229
233
|
end
|
230
234
|
|
235
|
+
raise Unauthorized if response.status == 401
|
236
|
+
raise Forbidden if response.status == 403
|
231
237
|
raise NotFound if response.status == 404
|
232
238
|
|
233
239
|
response
|
@@ -257,6 +263,8 @@ module Dependabot
|
|
257
263
|
raise ServiceNotAvailable if response.status == 503
|
258
264
|
end
|
259
265
|
|
266
|
+
raise Unauthorized if response.status == 401
|
267
|
+
raise Forbidden if response.status == 403
|
260
268
|
raise NotFound if response.status == 404
|
261
269
|
|
262
270
|
response
|
@@ -157,11 +157,12 @@ module Dependabot
|
|
157
157
|
path = Pathname.new(File.join(dir)).cleanpath.to_path.gsub(%r{^/*}, "")
|
158
158
|
|
159
159
|
@repo_contents ||= {}
|
160
|
-
@repo_contents[dir] ||=
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
160
|
+
@repo_contents[dir] ||= if repo_contents_path
|
161
|
+
_cloned_repo_contents(path)
|
162
|
+
else
|
163
|
+
_fetch_repo_contents(path, raise_errors: raise_errors,
|
164
|
+
fetch_submodules: fetch_submodules)
|
165
|
+
end
|
165
166
|
end
|
166
167
|
|
167
168
|
#################################################
|
@@ -225,6 +226,22 @@ module Dependabot
|
|
225
226
|
github_response.map { |f| _build_github_file_struct(f) }
|
226
227
|
end
|
227
228
|
|
229
|
+
def _cloned_repo_contents(relative_path)
|
230
|
+
repo_path = File.join(clone_repo_contents, relative_path)
|
231
|
+
return [] unless Dir.exist?(repo_path)
|
232
|
+
|
233
|
+
Dir.entries(repo_path).map do |name|
|
234
|
+
next if [".", ".."].include?(name)
|
235
|
+
|
236
|
+
OpenStruct.new(
|
237
|
+
name: name,
|
238
|
+
path: Pathname.new(File.join(relative_path, name)).cleanpath.to_path,
|
239
|
+
type: Dir.exist?(File.join(repo_path, name)) ? "dir" : "file",
|
240
|
+
size: 0 # NOTE: added for parity with github contents API
|
241
|
+
)
|
242
|
+
end.compact
|
243
|
+
end
|
244
|
+
|
228
245
|
def update_linked_paths(repo, path, commit, github_response)
|
229
246
|
case github_response.type
|
230
247
|
when "submodule"
|
data/lib/dependabot/version.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.156.
|
4
|
+
version: 0.156.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -298,14 +298,14 @@ dependencies:
|
|
298
298
|
requirements:
|
299
299
|
- - "~>"
|
300
300
|
- !ruby/object:Gem::Version
|
301
|
-
version: 1.
|
301
|
+
version: 1.18.0
|
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.18.0
|
309
309
|
- !ruby/object:Gem::Dependency
|
310
310
|
name: simplecov
|
311
311
|
requirement: !ruby/object:Gem::Requirement
|
@@ -469,7 +469,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
469
469
|
- !ruby/object:Gem::Version
|
470
470
|
version: 2.7.3
|
471
471
|
requirements: []
|
472
|
-
rubygems_version: 3.2.
|
472
|
+
rubygems_version: 3.2.22
|
473
473
|
signing_key:
|
474
474
|
specification_version: 4
|
475
475
|
summary: Shared code used between Dependabot package managers
|