mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-08-31 14:39:48 +08:00
Prepare for release
- Final cleanup
This commit is contained in:
Vendored
+13
-15
@@ -43,22 +43,20 @@ function run() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, headers, body;
|
||||
return __generator(this, function (_c) {
|
||||
try {
|
||||
url = core.getInput('url');
|
||||
headers = (_a = core.getInput('headers')) !== null && _a !== void 0 ? _a : '';
|
||||
body = (_b = core.getInput('body')) !== null && _b !== void 0 ? _b : '';
|
||||
core.info("Sending webhook request to " + url);
|
||||
core.debug((new Date()).toTimeString());
|
||||
http_1.http.make(url, headers, body)
|
||||
.then(function (res) {
|
||||
core.setOutput('statusCode', res.status);
|
||||
core.info("Received status code: " + res.status);
|
||||
});
|
||||
url = core.getInput('url');
|
||||
headers = (_a = core.getInput('headers')) !== null && _a !== void 0 ? _a : '';
|
||||
body = (_b = core.getInput('body')) !== null && _b !== void 0 ? _b : '';
|
||||
core.info("Sending webhook request to " + url);
|
||||
core.debug((new Date()).toTimeString());
|
||||
http_1.http.make(url, headers, body)
|
||||
.then(function (res) {
|
||||
core.setOutput('statusCode', res.status);
|
||||
core.info("Received status code: " + res.status);
|
||||
core.info((new Date()).toTimeString());
|
||||
}
|
||||
catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
})
|
||||
.catch(function (err) {
|
||||
core.setFailed("Received status code: " + err.status);
|
||||
});
|
||||
return [2];
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user