la3rence / OpsBot

A serverless robot manages your issues or pull requests from GitHub repo by comments out of the box.
https://go.lawrenceli.me/deploy-opsbot
MIT License
9 stars 4 forks source link
ci github github-client robot serverless webhook

OpsBot 🤖️

Test codecov

A robot based on GitHub sdk and Vercel's Serverless Function (Go). It acts like the Kubernetes Prow Robot. The robot manages your GitHub repo's issues and pull requests by the content of comments that the user sends.

This project is just getting start and is a toy tool now. For the effectiveness, you can check out any issue or pr from this repo. If you're interested in this stuff as well, issues or pull requests are welcomed.

Roadmap / Usage

Once every command accepted by bot, there'll be a 👍 reaction shows in the comment.

Deployment

Deploy with Vercel

Register a new GitHub account (as the robot) and create its personal access token. Don't forget to config the BOT_TOKEN and the WEBHOOK_SECRET as the production environment variable and invite it as your repo's collaborator for code access.

After all set up, a new URL will be generated and you can deploy the bot to your repo. Go to GitHub Repository -> Settings -> WebHook. Add a new WebHook, check application/json and choose all events(or events you care about). Input Payload URL (WebHook Serverless Function API) provided by Vercel, such as https://your-username.vercel.app/api/index. Protect this webhook by using secret with the same string of WEBHOOK_SECRET.

For more information you can contact the author or open an issue.

License

MIT