Skip to content

Commit

Permalink
feat: commit comment on push event
Browse files Browse the repository at this point in the history
  • Loading branch information
amondnet committed Oct 17, 2019
1 parent e9eb2d1 commit 6c50b33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -164,7 +164,7 @@ async function createCommentOnCommit () {
core.setOutput('preview-url', `https://${deploymentUrl}`)
}

async function createComment () {
async function createCommentOnPullRequest () {

const {
data: comments,
Expand Down

1 comment on commit 6c50b33

@amondnet
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deploy preview for website ready!

Built with commit undefined

https://zeit-now-deployment-action-9t50b11lo.now.sh

Please sign in to comment.