mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-11-25 08:56:57 +01:00
Prepare for release
- Final cleanup
This commit is contained in:
parent
db36b9f178
commit
5be5ae3f9a
9 changed files with 34 additions and 39 deletions
28
dist/index.js
vendored
28
dist/index.js
vendored
|
@ -2131,22 +2131,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];
|
||||
});
|
||||
});
|
||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
28
dist/main.js
vendored
28
dist/main.js
vendored
|
@ -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];
|
||||
});
|
||||
});
|
||||
|
|
2
dist/main.js.map
vendored
2
dist/main.js.map
vendored
|
@ -1 +1 @@
|
|||
{"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oCAAsC;AACtC,+BAA8B;AAE9B,SAAe,GAAG;;;;;YAChB,IAAI;gBACI,GAAG,GAAG,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAC3B,OAAO,SAAG,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,mCAAI,EAAE,CAAC;gBACzC,IAAI,SAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,mCAAI,EAAE,CAAC;gBAGzC,IAAI,CAAC,IAAI,CAAC,gCAA8B,GAAK,CAAC,CAAC;gBAG/C,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAA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CAAC,IAAI,CAAC,2BAAyB,GAAG,CAAC,MAAQ,CAAC,CAAC;gBAEjD,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;YACzC,CAAC,CAAC;iBACD,KAAK,CAAC,UAAC,GAAG;gBAET,IAAI,CAAC,SAAS,CAAC,2BAAyB,GAAG,CAAC,MAAQ,CAAC,CAAC;YACxD,CAAC,CAAC,CAAC;;;;CACR;AAED,GAAG,EAAE,CAAC"}
|
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/cli.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/index.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/relocate-loader.js.cache
generated
vendored
Binary file not shown.
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
BIN
node_modules/@vercel/ncc/dist/ncc/loaders/shebang-loader.js.cache
generated
vendored
Binary file not shown.
13
src/main.ts
13
src/main.ts
|
@ -2,7 +2,6 @@ import * as core from '@actions/core';
|
|||
import { http } from './http';
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
const url = core.getInput('url');
|
||||
const headers = core.getInput('headers') ?? '';
|
||||
const body = core.getInput('body') ?? '';
|
||||
|
@ -20,13 +19,13 @@ async function run() {
|
|||
core.setOutput('statusCode', res.status);
|
||||
// report on the status code
|
||||
core.info(`Received status code: ${res.status}`);
|
||||
// debug end
|
||||
core.info((new Date()).toTimeString());
|
||||
})
|
||||
.catch((err) => {
|
||||
// set the action to failed
|
||||
core.setFailed(`Received status code: ${err.status}`);
|
||||
});
|
||||
|
||||
// debug end
|
||||
core.info((new Date()).toTimeString());
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
Loading…
Reference in a new issue