markdownify
markdownify copied to clipboard
handle pull_request.synchronize action
closes #3
@hiimbex do you have CI setup yet?
Note that the tests pass although I didn’t implement the handling of the pull_request.synchronize action yet. This is confusing me, it looks like await probot.receive({name: 'pull_request', payload: payloadSynchronize}) does not check payload.action? Any idea?
For the record the "fix" is simple
- app.on('pull_request.opened', async context => {
+ app.on([
+ 'pull_request.opened',
+ 'pull_request.synchronize'
+ ], async context => {
I just don’t want to push it so you can reproduce the tests already pass
Note that the tests pass although I didn’t implement the handling of the pull_request.synchronize action yet. This is confusing me, it looks like await probot.receive({name: 'pull_request', payload: payloadSynchronize}) does not check payload.action? Any idea?
After running the CI, I see I was wrong about it perhaps not being run at all. Honestly not sure! I'm guessing it's an issue with probot.receive and testing specific, not generally, but would be curious to investigate more, into receive:
https://github.com/probot/probot/blob/ad06bd5e321fdae893f88ef216102e0e330ba782/src/application.ts#L69-L81