Skip to content

Commit 6c50b33

Browse files
committed
feat: commit comment on push event
1 parent e9eb2d1 commit 6c50b33

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ async function run () {
2727
await nowDeploy()
2828
if (context.issue.number) {
2929
core.info('this is related issue or pull_request ')
30-
await createComment()
31-
} else if (context.payload.push) {
30+
await createCommentOnPullRequest()
31+
} else if (context.eventName === 'push') {
3232
core.info('this is push event')
3333
await createCommentOnCommit()
3434
}
@@ -164,7 +164,7 @@ async function createCommentOnCommit () {
164164
core.setOutput('preview-url', `https://${deploymentUrl}`)
165165
}
166166

167-
async function createComment () {
167+
async function createCommentOnPullRequest () {
168168

169169
const {
170170
data: comments,

0 commit comments

Comments
 (0)