gr2m / github-app-slack-demo

A minimal GitHub App that integrates with Slack
MIT License
2 stars 0 forks source link

8 deploy to netlify #9

Open developertom01 opened 3 weeks ago

developertom01 commented 3 weeks ago

Thought process

I had two implementation ideas.

  1. 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.
  2. 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.
netlify[bot] commented 3 weeks ago

Deploy Preview for github-app-slack-demo ready!

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...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

gr2m commented 2 weeks ago

Thought process

I had two implementation ideas.

  1. 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.
  2. 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 👍🏼

gr2m commented 2 weeks ago

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