Open developertom01 opened 3 weeks ago
Name | Link |
---|---|
Latest commit | cd660a9c71ddfa91e62b0e9b6d9e01d448cf20f4 |
Latest deploy log | https://app.netlify.com/sites/github-app-slack-demo/deploys/6671651b2af9050009c23b47 |
Deploy Preview | https://deploy-preview-9--github-app-slack-demo.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Thought process
I had two implementation ideas.
- was to use the
createNodeMiddleware
. With that I could use an http server and run functions as documented by netlify. Check this commit for implementation.- Implementation 1 felt like an overkill and completely irrelevant so I got rid of middleware and http server. I called the
wehbhook.verifyAndApply
method, parsed payload, which tend to work fine if I am not missing anything.
Thank you for sharing your thought process, much appreciated!
You definitely took the right approach. In a perfect world, we would have middleware adapters for the different deployment targets, which is something I wanted to do for a long time as a new type of @octokit plugin. But for the time being, your approach is the correct one 👍🏼
Let me know if you would like me to finish this up. I'd like to have the demo repository and app ready and operational by the end of this week
Thought process
I had two implementation ideas.
createNodeMiddleware
. With that I could use an http server and run functions as documented by netlify. Check this commit for implementation.wehbhook.verifyAndApply
method, parsed payload, which tend to work fine if I am not missing anything.