mirror of
https://github.com/joelwmale/webhook-action.git
synced 2026-09-01 23:10:44 +08:00
feat: fix syntax error
This commit is contained in:
+4
-2
@@ -27,10 +27,12 @@ async function run() {
|
||||
? process.env.insecure == 'true'
|
||||
: false
|
||||
|
||||
const githubEvent = core.getInput('github_event') == 'true'
|
||||
|
||||
// if github_event is set to true, append it to the body
|
||||
if (process.env.github_event && body) {
|
||||
if (githubEvent) {
|
||||
// decode the body
|
||||
const decodedBody = JSON.parse(body)
|
||||
const decodedBody = JSON.parse(body || '{}')
|
||||
|
||||
// set the github event
|
||||
decodedBody.github_event = context
|
||||
|
||||
Reference in New Issue
Block a user