mirror of
https://github.com/joelwmale/webhook-action.git
synced 2024-08-25 08:08:00 +00:00
Add backwards compatibility
This commit is contained in:
parent
01d242f5b1
commit
0c4ba5b174
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -86,9 +86,9 @@ function run() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, headers, body;
|
||||
return __generator(this, function (_a) {
|
||||
url = core.getInput('url') ? core.getInput('url') : (process.env.url ? process.env.url : '');
|
||||
url = core.getInput('url') ? core.getInput('url') : (process.env.WEBHOOK_URL ? process.env.WEBHOOK_URL : '');
|
||||
headers = core.getInput('headers') ? core.getInput('headers') : (process.env.headers ? process.env.headers : null);
|
||||
body = core.getInput('body') ? core.getInput('body') : (process.env.body ? process.env.body : null);
|
||||
body = core.getInput('body') ? core.getInput('body') : (process.env.data ? process.env.data : null);
|
||||
if (!url) {
|
||||
core.setFailed('A url is required to run this action.');
|
||||
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
4
dist/main.js
vendored
4
dist/main.js
vendored
@ -42,9 +42,9 @@ function run() {
|
||||
return __awaiter(this, void 0, void 0, function () {
|
||||
var url, headers, body;
|
||||
return __generator(this, function (_a) {
|
||||
url = core.getInput('url') ? core.getInput('url') : (process.env.url ? process.env.url : '');
|
||||
url = core.getInput('url') ? core.getInput('url') : (process.env.WEBHOOK_URL ? process.env.WEBHOOK_URL : '');
|
||||
headers = core.getInput('headers') ? core.getInput('headers') : (process.env.headers ? process.env.headers : null);
|
||||
body = core.getInput('body') ? core.getInput('body') : (process.env.body ? process.env.body : null);
|
||||
body = core.getInput('body') ? core.getInput('body') : (process.env.data ? process.env.data : null);
|
||||
if (!url) {
|
||||
core.setFailed('A url is required to run this action.');
|
||||
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":";;;;;;;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I,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;YAE1G,IAAI,CAAC,GAAG,EAAE;gBAER,IAAI,CAAC,SAAS,CAAC,uCAAuC,CAAC,CAAC;gBACxD,WAAO;aACR;YAGD,IAAI,CAAC,IAAI,CAAC,gCAA8B,GAAK,CAAC,CAAC;YAG/C,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,YAAY,EAAE,CAAC,CAAC;YAGxC,WAAI,CAAC,IAAI,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,CAAC;iBAC1B,IAAI,CAAC,UAAC,GAAG;gBAER,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;gBAEzC,IAAI,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.
@ -2,9 +2,9 @@ import * as core from '@actions/core';
|
||||
import { http } from './http';
|
||||
|
||||
async function run() {
|
||||
const url = core.getInput('url') ? core.getInput('url') : (process.env.url ? process.env.url : '');
|
||||
const url = core.getInput('url') ? core.getInput('url') : (process.env.WEBHOOK_URL ? process.env.WEBHOOK_URL : '');
|
||||
const headers = core.getInput('headers') ? core.getInput('headers') : (process.env.headers ? process.env.headers : null);
|
||||
const body = core.getInput('body') ? core.getInput('body') : (process.env.body ? process.env.body : null);
|
||||
const body = core.getInput('body') ? core.getInput('body') : (process.env.data ? process.env.data : null);
|
||||
|
||||
if (!url) {
|
||||
// validate a url
|
||||
|
Loading…
Reference in New Issue
Block a user