Learn how to use an external rest API and subscribe to webhooks using the GitHub API and GitHub Webhooks. Start off by just fetching all of the existing pull requests and doing something to them. Then, later, subscribe to a webhook to run it automatically.
- Create an access token
- Create the scrip
- Create the webhook to run the script
- Set up ngrok to forward the webhook to local machine
Run ngork: ngrok http 127.0.0.1:80
start server with> bun index.ts