From 6c50b33f1272262ae1ab14a4e703e5b1b46cb46c Mon Sep 17 00:00:00 2001 From: Minsu Lee Date: Thu, 17 Oct 2019 14:10:44 +0900 Subject: [PATCH] feat: commit comment on push event --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 4510093..9e101c4 100644 --- a/index.js +++ b/index.js @@ -27,8 +27,8 @@ async function run () { await nowDeploy() if (context.issue.number) { core.info('this is related issue or pull_request ') - await createComment() - } else if (context.payload.push) { + await createCommentOnPullRequest() + } else if (context.eventName === 'push') { core.info('this is push event') await createCommentOnCommit() } @@ -164,7 +164,7 @@ async function createCommentOnCommit () { core.setOutput('preview-url', `https://${deploymentUrl}`) } -async function createComment () { +async function createCommentOnPullRequest () { const { data: comments,