gitlab-fetch
Advanced tools
Comparing version 0.2.2-dev.8981775 to 0.2.2-dev.8982224
@@ -20,3 +20,3 @@ "use strict"; | ||
return this.fetch('POST', undefined, {}, { | ||
body: Object.assign({}, params, { branch, commit_message: commitMessage, actions }), | ||
body: Object.assign({}, params, { branch_name: branch, commit_message: commitMessage, actions }), | ||
}); | ||
@@ -23,0 +23,0 @@ } |
@@ -83,3 +83,3 @@ "use strict"; | ||
if (response.status < 200 || response.status >= 300) { | ||
debug_1.network(response); | ||
debug_1.network(' => %O', body); | ||
throw new Error(`Unexpected HTTP status (${response.status}) from ${response.url}`); | ||
@@ -131,6 +131,11 @@ } | ||
debug_1.network('%s %s', method, url); | ||
let requestBody = undefined; | ||
if (body !== undefined) { | ||
requestBody = JSON.stringify(body); | ||
headers.set('Content-Type', 'application/json'); | ||
} | ||
const response = yield node_fetch_1.default(url, { | ||
method, | ||
headers, | ||
body: body !== undefined ? JSON.stringify(body) : undefined, | ||
body: requestBody, | ||
}); | ||
@@ -137,0 +142,0 @@ debug_1.network('=> %d', response.status); |
{ | ||
"name": "gitlab-fetch", | ||
"version": "0.2.2-dev.8981775", | ||
"version": "0.2.2-dev.8982224", | ||
"author": "Jay Anslow <jay@anslow.me.uk>", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
77576
1459