Skip to content

Commit

Permalink
fix: add missing "synchronize" action to "pull_request" event
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Dec 12, 2018
1 parent e97c036 commit 4b0ebad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion index.json
Original file line number Diff line number Diff line change
Expand Up @@ -3605,7 +3605,8 @@
"opened",
"edited",
"closed",
"reopened"
"reopened",
"synchronize"
],
"examples": [
{
Expand Down
10 changes: 8 additions & 2 deletions lib/workarounds.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ function workarounds (webhooks) {
'deleted',
'edited'
]

return
}

if (webhook.name === 'commit_comment') {
Expand All @@ -31,5 +29,13 @@ function workarounds (webhooks) {
'created'
]
}

if (webhook.name === 'pull_request') {
if (webhook.actions.includes('synchronize')) {
throw new Error('Remove workaround add "synchronize" event to "pull_request"')
}

webhook.actions.push('synchronize')
}
})
}

0 comments on commit 4b0ebad

Please sign in to comment.