Snitch is a Slack bot that fetches and publish PRs with pendings reviews in channels or via DM
I hold no liability for what you do with this bot or what happens to you by using this bot.
Before running the bot, you must first set it up so it can connect to Github and Slack API.
To do this, you will need to setup the following environment variables:
- ENTERPRISE_GITHUB (Only to true if you are using an enterprise version of Github)
- GITHUB_ADDRES (Only if you are using an enterprise version of github. The URL should be like https://github.{company}.io/)
- GITHUB_TOKEN (Your generated token with **repo** and **user** permissions granted)
- HTTP_ADDRESS (The address of the server where your bot is running)
- SLACK_API_TOKEN (A bot token generated for an Slack application)
For generating Github access token you can follow this guide
For creating a Slack application you can follow this guide
After creating the Slack application, you need to create two slash commands:
- repo-prs: (This will receive a Github repository and returns all the PRs and Issues in it)
- user-prs: (This will receive a Github username and returns all the PRs and Issues that the user has pending of review)
For running the bot locally I recommend using ngrok to redirect the HTTP calls from Slack to your local environment.
When using:
If you're having issues with or have questions about the bot, file an issue in this repository so anyone can get back to you.
Or feel free to contact me [email protected] :)