markdownify icon indicating copy to clipboard operation
markdownify copied to clipboard

handle pull_request.synchronize action

Open gr2m opened this issue 6 years ago • 3 comments

closes #3

gr2m avatar Oct 31 '18 17:10 gr2m

@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?

gr2m avatar Oct 31 '18 17:10 gr2m

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

gr2m avatar Oct 31 '18 17:10 gr2m

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

hiimbex avatar Nov 01 '18 03:11 hiimbex