hasura-bot ๐ค
Hasura's own GitHub bot, currently tasked with commenting on pull requests when they are opened/closed/merged.
Deployed on Zeit Now: https://hasura-github-bot.now.sh
Local Setup
- Fork this repo and clone it on your system:
git clone https://github.com/<username>/github-bot
- Navigate into the repo and install the dependencies:
cd github-bot npm install
- Create a
.env
file and setGITHUB_TOKEN
andWEBHOOK_SECRET
env variables. - Start a local server using
vercel
:Note: By defaultnpm run dev
vercel
starts the server on port 3000. You can set a different port using the--listen
flag.npm run dev -- --listen <port>
- Set up port forwarding with
ngrok
(installngrok
from here if you don't already have it):In the webhook settings on Github, set the "Payload URL" to the one provided by ngrok.ngrok http <port>
Note: Also make sure that the "Content type" field in the webhook settings is set toapplication/json
.
Contribution guidelines
- Create a new branch:
git checkout -b <branch-name>
- Make the required changes in the code.
- Stage and commit your changes:
git add . git commit -m "<commit message>"
- Push the changes to your fork:
git push -u origin <branch-name>
- Create a pull request to this repo.