dependabot-common 0.140.2 → 0.142.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8c9dc9b0f20806bf74ca6015aeaaf9fd33574d66d2170bca6c0605927c4160f9
|
4
|
+
data.tar.gz: d058e21f7402cc5f6f4105686d6c975130a165a98a4bded064cb6b18ff500fb1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d54f958fe2243db610fb5264442242b1407a7186e631a28697007d1da4260995beeecf3721cff9825c03a5ddf22cac51f49dcea9ce57a1d13efbfbe17eb897b
|
7
|
+
data.tar.gz: ea4d8ce7034b84f8a71cebc347ec8e460ce5a7c87588299192b5922ee433fdc257b7c9d756b4d82da5d07b751690c1091fbbb46f2c4a3377bfd050607a2c7ba0
|
@@ -201,9 +201,11 @@ module Dependabot
|
|
201
201
|
}
|
202
202
|
]
|
203
203
|
|
204
|
-
post(source.api_endpoint + source.organization + "/" + source.project +
|
205
|
-
|
206
|
-
|
204
|
+
response = post(source.api_endpoint + source.organization + "/" + source.project +
|
205
|
+
"/_apis/git/repositories/" + source.unscoped_repo +
|
206
|
+
"/refs?api-version=5.0", content.to_json)
|
207
|
+
|
208
|
+
JSON.parse(response.body).fetch("value").first
|
207
209
|
end
|
208
210
|
# rubocop:enable Metrics/ParameterLists
|
209
211
|
|
@@ -6,6 +6,8 @@ require "securerandom"
|
|
6
6
|
module Dependabot
|
7
7
|
class PullRequestUpdater
|
8
8
|
class Azure
|
9
|
+
class PullRequestUpdateFailed < Dependabot::DependabotError; end
|
10
|
+
|
9
11
|
OBJECT_ID_FOR_BRANCH_DELETE = "0000000000000000000000000000000000000000"
|
10
12
|
|
11
13
|
attr_reader :source, :files, :base_commit, :old_commit, :credentials,
|
@@ -55,9 +57,11 @@ module Dependabot
|
|
55
57
|
# 1) Push the file changes to a newly created temporary branch (from base commit)
|
56
58
|
new_commit = create_temp_branch
|
57
59
|
# 2) Update PR source branch to point to the temp branch head commit.
|
58
|
-
update_branch(source_branch_name, old_source_branch_commit, new_commit)
|
60
|
+
response = update_branch(source_branch_name, old_source_branch_commit, new_commit)
|
59
61
|
# 3) Delete temp branch
|
60
62
|
update_branch(temp_branch_name, new_commit, OBJECT_ID_FOR_BRANCH_DELETE)
|
63
|
+
|
64
|
+
raise PullRequestUpdateFailed, response.fetch("customMessage", nil) unless response.fetch("success", false)
|
61
65
|
end
|
62
66
|
|
63
67
|
def pull_request
|
@@ -157,6 +157,8 @@ module Dependabot
|
|
157
157
|
backup_git_config_path = stash_global_git_config
|
158
158
|
configure_git_to_use_https_with_credentials(credentials)
|
159
159
|
yield
|
160
|
+
rescue Errno::ENOSPC => e
|
161
|
+
raise Dependabot::OutOfDisk, e.message
|
160
162
|
ensure
|
161
163
|
reset_global_git_config(backup_git_config_path)
|
162
164
|
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.
|
4
|
+
version: 0.142.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dependabot
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-04-
|
11
|
+
date: 2021-04-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -463,7 +463,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
463
463
|
- !ruby/object:Gem::Version
|
464
464
|
version: 2.7.3
|
465
465
|
requirements: []
|
466
|
-
rubygems_version: 3.2.
|
466
|
+
rubygems_version: 3.2.15
|
467
467
|
signing_key:
|
468
468
|
specification_version: 4
|
469
469
|
summary: Shared code used between Dependabot package managers
|