Handle `pull_request.synchronize` as well

This commit is contained in:
Pedro Pombeiro 2019-01-29 18:57:40 +01:00
parent 87762259ec
commit 72bc1ae167
No known key found for this signature in database
GPG Key ID: A65DEB11E4BBC647
3 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
ISC License
Copyright (c) 2019, Pedro Pombeiro <pombeirp@users.noreply.github.com> (https://github.com/status-im/deps-lock-snitch-bot)
Copyright (c) 2019, Status.im <pombeirp@users.noreply.github.com> (https://github.com/status-im/deps-lock-snitch-bot)
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted, provided that the above

View File

@ -23,4 +23,4 @@ For more, check out the [Contributing Guide](CONTRIBUTING.md).
## License
[ISC](LICENSE) © 2019 Pedro Pombeiro <pombeirp@users.noreply.github.com> (https://github.com/status-im/deps-lock-snitch-bot)
[ISC](LICENSE) © 2019 Status.im <pombeirp@users.noreply.github.com> (https://github.com/status-im/deps-lock-snitch-bot)

View File

@ -7,7 +7,7 @@ interface Config {
}
export = (app: Application) => {
app.on(['pull_request.opened', 'pull_request.edited'], (context: Context) => {
app.on(['pull_request.opened', 'pull_request.edited', 'pull_request.synchronize'], (context: Context) => {
return handlePullRequest(context)
})
// For more information on building apps:
@ -18,8 +18,7 @@ export = (app: Application) => {
}
async function handlePullRequest(context: Context) {
const { github, payload } = context
const { pull_request } = payload
const { github, payload, payload: { pull_request } } = context
const lockFiles: string[] = []
await github.paginate(