nodejs/github-bot ? reverse-engineered prompt

Reverse engineered prompt

Build me a Node.js GitHub bot that listens for GitHub webhook events and runs different scripts based on the event it receives.

I want it to be able to handle repo management tasks for an organization, with one bot instance serving multiple repositories. It should verify webhook requests with a shared secret, use a GitHub token for API actions, and expose a logs endpoint that can be protected with basic login. I also need a way to limit which scripts run, so I can start only one or a few event handlers while developing.

Please make local development easy too, with support for loading environment variables from a .env file and an option to receive events through a relay or similar setup instead of pointing GitHub directly at my machine. If there are any current best practices or docs I should follow for GitHub webhooks or Node.js server setup, look them up online if needed.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab