dependabot-common 0.106.24 → 0.106.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e36a9f3c0cd33577b87e4c5223c58ac3a7979aa1f149982b302e53f1d10d50c1
|
|
4
|
+
data.tar.gz: 7bcf71897e15bcb565983a5fb2738700ab366bdd8adb4628e7ba16de79cb2cb2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ddebe9792fa5fc11e42b602e3fd14f2c2556a0eb70a0d053a8e3efd45e89198d65205ef48f7f4dd5c39a4130d0bad991a47cdb9dd64a14e920720092cc79a8f
|
|
7
|
+
data.tar.gz: a6bc88d8fcee2cbc9d94ba7589b6ec93c9c84a45ab738edb32b4533a878b485d12de0464a333afcd6a17d30c441bf30aa37512e98cbcea744b5f065f56db1322
|
|
@@ -65,6 +65,7 @@ module Dependabot
|
|
|
65
65
|
|
|
66
66
|
private
|
|
67
67
|
|
|
68
|
+
# rubocop:disable Naming/RescuedExceptionsVariableName
|
|
68
69
|
def fetch_file_if_present(filename, fetch_submodules: false)
|
|
69
70
|
dir = File.dirname(filename)
|
|
70
71
|
basename = File.basename(filename)
|
|
@@ -80,7 +81,9 @@ module Dependabot
|
|
|
80
81
|
path = Pathname.new(File.join(directory, filename)).cleanpath.to_path
|
|
81
82
|
raise Dependabot::DependencyFileNotFound, path
|
|
82
83
|
end
|
|
84
|
+
# rubocop:enable Naming/RescuedExceptionsVariableName
|
|
83
85
|
|
|
86
|
+
# rubocop:disable Naming/RescuedExceptionsVariableName
|
|
84
87
|
def fetch_file_from_host(filename, type: "file", fetch_submodules: false)
|
|
85
88
|
path = Pathname.new(File.join(directory, filename)).cleanpath.to_path
|
|
86
89
|
|
|
@@ -93,6 +96,7 @@ module Dependabot
|
|
|
93
96
|
rescue *CLIENT_NOT_FOUND_ERRORS
|
|
94
97
|
raise Dependabot::DependencyFileNotFound, path
|
|
95
98
|
end
|
|
99
|
+
# rubocop:enable Naming/RescuedExceptionsVariableName
|
|
96
100
|
|
|
97
101
|
def repo_contents(dir: ".", ignore_base_directory: false,
|
|
98
102
|
raise_errors: true, fetch_submodules: false)
|
|
@@ -111,6 +115,7 @@ module Dependabot
|
|
|
111
115
|
# INTERNAL METHODS (not for use by sub-classes) #
|
|
112
116
|
#################################################
|
|
113
117
|
|
|
118
|
+
# rubocop:disable Naming/RescuedExceptionsVariableName
|
|
114
119
|
def _fetch_repo_contents(path, fetch_submodules: false,
|
|
115
120
|
raise_errors: true)
|
|
116
121
|
path = path.gsub(" ", "%20")
|
|
@@ -139,6 +144,7 @@ module Dependabot
|
|
|
139
144
|
retrying = true
|
|
140
145
|
retry
|
|
141
146
|
end
|
|
147
|
+
# rubocop:enable Naming/RescuedExceptionsVariableName
|
|
142
148
|
|
|
143
149
|
def _fetch_repo_contents_fully_specified(provider, repo, path, commit)
|
|
144
150
|
case provider
|
|
@@ -264,6 +270,7 @@ module Dependabot
|
|
|
264
270
|
end
|
|
265
271
|
end
|
|
266
272
|
|
|
273
|
+
# rubocop:disable Naming/RescuedExceptionsVariableName
|
|
267
274
|
def _fetch_file_content(path, fetch_submodules: false)
|
|
268
275
|
path = path.gsub(%r{^/*}, "")
|
|
269
276
|
|
|
@@ -283,6 +290,7 @@ module Dependabot
|
|
|
283
290
|
retrying = true
|
|
284
291
|
retry
|
|
285
292
|
end
|
|
293
|
+
# rubocop:enable Naming/RescuedExceptionsVariableName
|
|
286
294
|
|
|
287
295
|
def _fetch_file_content_fully_specified(provider, repo, path, commit)
|
|
288
296
|
case provider
|
|
@@ -312,8 +320,8 @@ module Dependabot
|
|
|
312
320
|
end
|
|
313
321
|
|
|
314
322
|
Base64.decode64(tmp.content).force_encoding("UTF-8").encode
|
|
315
|
-
rescue Octokit::Forbidden =>
|
|
316
|
-
raise unless
|
|
323
|
+
rescue Octokit::Forbidden => e
|
|
324
|
+
raise unless e.message.include?("too_large")
|
|
317
325
|
|
|
318
326
|
# Fall back to Git Data API to fetch the file
|
|
319
327
|
prefix_dir = directory.gsub(%r{(^/|/$)}, "")
|
|
@@ -329,12 +337,14 @@ module Dependabot
|
|
|
329
337
|
end
|
|
330
338
|
# rubocop:enable Metrics/AbcSize
|
|
331
339
|
|
|
340
|
+
# rubocop:disable Naming/RescuedExceptionsVariableName
|
|
332
341
|
def default_branch_for_repo
|
|
333
342
|
@default_branch_for_repo ||= client_for_provider.
|
|
334
343
|
fetch_default_branch(repo)
|
|
335
344
|
rescue *CLIENT_NOT_FOUND_ERRORS
|
|
336
345
|
raise Dependabot::RepoNotFound, source
|
|
337
346
|
end
|
|
347
|
+
# rubocop:enable Naming/RescuedExceptionsVariableName
|
|
338
348
|
|
|
339
349
|
# Update the @linked_paths hash by exploiting a side-effect of
|
|
340
350
|
# recursively calling `repo_contents` for each directory up the tree
|
|
@@ -122,8 +122,8 @@ module Dependabot
|
|
|
122
122
|
base_commit,
|
|
123
123
|
options
|
|
124
124
|
)
|
|
125
|
-
rescue Octokit::UnprocessableEntity =>
|
|
126
|
-
raise unless
|
|
125
|
+
rescue Octokit::UnprocessableEntity => e
|
|
126
|
+
raise unless e.message == "Tree SHA does not exist"
|
|
127
127
|
|
|
128
128
|
# Sometimes a race condition on GitHub's side means we get an error
|
|
129
129
|
# here. No harm in retrying if we do.
|
|
@@ -181,9 +181,9 @@ module Dependabot
|
|
|
181
181
|
"heads/#{branch_name}",
|
|
182
182
|
commit.sha
|
|
183
183
|
)
|
|
184
|
-
rescue Octokit::UnprocessableEntity =>
|
|
184
|
+
rescue Octokit::UnprocessableEntity => e
|
|
185
185
|
# Return quietly in the case of a race
|
|
186
|
-
return nil if
|
|
186
|
+
return nil if e.message.match?(/Reference already exists/i)
|
|
187
187
|
raise if @retrying_branch_creation
|
|
188
188
|
|
|
189
189
|
@retrying_branch_creation = true
|
|
@@ -220,9 +220,9 @@ module Dependabot
|
|
|
220
220
|
reviewers: reviewers_hash[:reviewers] || [],
|
|
221
221
|
team_reviewers: reviewers_hash[:team_reviewers] || []
|
|
222
222
|
)
|
|
223
|
-
rescue Octokit::UnprocessableEntity =>
|
|
224
|
-
return if
|
|
225
|
-
return if
|
|
223
|
+
rescue Octokit::UnprocessableEntity => e
|
|
224
|
+
return if e.message.include?("not a collaborator")
|
|
225
|
+
return if e.message.include?("Could not resolve to a node")
|
|
226
226
|
|
|
227
227
|
raise
|
|
228
228
|
end
|
|
@@ -244,8 +244,8 @@ module Dependabot
|
|
|
244
244
|
pull_request.number,
|
|
245
245
|
milestone: milestone
|
|
246
246
|
)
|
|
247
|
-
rescue Octokit::UnprocessableEntity =>
|
|
248
|
-
raise unless
|
|
247
|
+
rescue Octokit::UnprocessableEntity => e
|
|
248
|
+
raise unless e.message.include?("code: invalid")
|
|
249
249
|
end
|
|
250
250
|
|
|
251
251
|
def create_pull_request
|
|
@@ -256,12 +256,12 @@ module Dependabot
|
|
|
256
256
|
pr_name,
|
|
257
257
|
pr_description
|
|
258
258
|
)
|
|
259
|
-
rescue Octokit::UnprocessableEntity =>
|
|
259
|
+
rescue Octokit::UnprocessableEntity => e
|
|
260
260
|
# Ignore races that we lose
|
|
261
|
-
return if
|
|
261
|
+
return if e.message.include?("pull request already exists")
|
|
262
262
|
|
|
263
263
|
# Ignore cases where the target branch has been deleted
|
|
264
|
-
return if
|
|
264
|
+
return if e.message.include?("field: base") &&
|
|
265
265
|
source.branch &&
|
|
266
266
|
!branch_exists?(source.branch)
|
|
267
267
|
|
|
@@ -302,8 +302,8 @@ module Dependabot
|
|
|
302
302
|
accept: "application/vnd.github.symmetra-preview+json"
|
|
303
303
|
)
|
|
304
304
|
@labels = [*@labels, "security"].uniq
|
|
305
|
-
rescue Octokit::UnprocessableEntity =>
|
|
306
|
-
raise unless
|
|
305
|
+
rescue Octokit::UnprocessableEntity => e
|
|
306
|
+
raise unless e.errors.first.fetch(:code) == "already_exists"
|
|
307
307
|
|
|
308
308
|
@labels = [*@labels, "security"].uniq
|
|
309
309
|
end
|
|
@@ -330,8 +330,8 @@ module Dependabot
|
|
|
330
330
|
accept: "application/vnd.github.symmetra-preview+json"
|
|
331
331
|
)
|
|
332
332
|
@labels = [*@labels, langauge_name].uniq
|
|
333
|
-
rescue Octokit::UnprocessableEntity =>
|
|
334
|
-
raise unless
|
|
333
|
+
rescue Octokit::UnprocessableEntity => e
|
|
334
|
+
raise unless e.errors.first.fetch(:code) == "already_exists"
|
|
335
335
|
|
|
336
336
|
@labels = [*@labels, langauge_name].uniq
|
|
337
337
|
end
|
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.106.
|
|
4
|
+
version: 0.106.25
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dependabot
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-04-
|
|
11
|
+
date: 2019-04-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: aws-sdk-ecr
|
|
@@ -266,14 +266,14 @@ dependencies:
|
|
|
266
266
|
requirements:
|
|
267
267
|
- - "~>"
|
|
268
268
|
- !ruby/object:Gem::Version
|
|
269
|
-
version: 0.
|
|
269
|
+
version: 0.68.0
|
|
270
270
|
type: :development
|
|
271
271
|
prerelease: false
|
|
272
272
|
version_requirements: !ruby/object:Gem::Requirement
|
|
273
273
|
requirements:
|
|
274
274
|
- - "~>"
|
|
275
275
|
- !ruby/object:Gem::Version
|
|
276
|
-
version: 0.
|
|
276
|
+
version: 0.68.0
|
|
277
277
|
- !ruby/object:Gem::Dependency
|
|
278
278
|
name: vcr
|
|
279
279
|
requirement: !ruby/object:Gem::Requirement
|