diff --git a/dist/index.js b/dist/index.js index 86a3c6a23f6fa4d989389507227ebfa71f56f98d..ab3d909199ff9f7c691e60f5db6ab7f826221037 100644 Binary files a/dist/index.js and b/dist/index.js differ diff --git a/dist/index.js.map b/dist/index.js.map index 8da2d6927b4605e463242d4d1cb6e6532903b30f..18b4ce9a1183b0a721159715571c8572c0b9f04f 100644 Binary files a/dist/index.js.map and b/dist/index.js.map differ diff --git a/dist/licenses.txt b/dist/licenses.txt index e88ce8f9686f5d55284afbfa48403f1042c3b4e1..a848a33d61ae13ffef35591fd1d0e69e1681ee8c 100644 Binary files a/dist/licenses.txt and b/dist/licenses.txt differ diff --git a/src/main.ts b/src/main.ts index 945d4c3a30660b6b05314782427b38a3255376b1..fce3c03250cabe9d12b07a71e15066c66352a288 100644 --- a/src/main.ts +++ b/src/main.ts @@ -5,20 +5,26 @@ import * as webhook from '@octokit/webhooks' async function run(): Promise { try { - - console.log(github.context) - if (github.context.payload.action && !['created', 'opened'].includes(github.context.payload.action)) { - console.log(`The status of the action is no applicable ${github.context.payload.action}, return`) + core.info(JSON.stringify(github.context)) + if ( + github.context.payload.action && + !['created', 'opened'].includes(github.context.payload.action) + ) { + core.info( + `The status of the action is no applicable ${github.context.payload.action}, return` + ) return } - if (github.context.eventName == "issue") { - const issuePayload = github.context.payload as webhook.EventPayloads.WebhookPayloadIssues; - console.log(issuePayload) - } else if (github.context.eventName == "issue_comment") { - const issueCommentPayload = github.context.payload as webhook.EventPayloads.WebhookPayloadIssueComment; - console.log(issueCommentPayload) + if (github.context.eventName === 'issue') { + const issuePayload = github.context + .payload as webhook.EventPayloads.WebhookPayloadIssues + core.info(JSON.stringify(issuePayload)) + } else if (github.context.eventName === 'issue_comment') { + const issueCommentPayload = github.context + .payload as webhook.EventPayloads.WebhookPayloadIssueComment + core.info(JSON.stringify(issueCommentPayload)) } else { - console.log(github.context.payload) + core.info(JSON.stringify(github.context.payload)) } const ms: string = core.getInput('milliseconds')