mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-09-02 08:44:44 +08:00
feat: finish updates & adding github event support
This commit is contained in:
Vendored
+5
-5
@@ -72,14 +72,14 @@ function run() {
|
||||
? process.env.data
|
||||
: null;
|
||||
const insecure = core.getInput('insecure')
|
||||
? core.getInput('insecure') == 'true'
|
||||
? core.getInput('insecure') === 'true'
|
||||
: process.env.insecure
|
||||
? process.env.insecure == 'true'
|
||||
? process.env.insecure === 'true'
|
||||
: false;
|
||||
const githubEvent = core.getInput('github_event') == 'true';
|
||||
if (githubEvent) {
|
||||
const githubEventPayload = core.getInput('github_event_payload') === 'true';
|
||||
if (githubEventPayload) {
|
||||
const decodedBody = JSON.parse(body || '{}');
|
||||
decodedBody.github_event = github_1.context;
|
||||
decodedBody.githubEventPayload = github_1.context.payload || {};
|
||||
body = JSON.stringify(decodedBody);
|
||||
}
|
||||
if (!url) {
|
||||
|
||||
Reference in New Issue
Block a user