Building a Git Issue Bot on Hasura
This tutorial consists of a quickstart github bot which can be easily deployed and modified.
This bot encourages a user when he/she opens a new issue and also it encourages the collaborator who closes the issue. This can be used to manage a good online environment on github.
Github API client by Philip Schatz
Getting the bot running
Create a new Github account for your bot
Navigate to https://github.com
Choose sign-up and follow procedures to create a new account and password.
Now login back to your main account (Do not forget this step)
Fill the details such as Homepage url(Optional but you give me a few credits too) and webhook url. The webhook url is https://bot.yourclustername.hasura-app.io/webhook.
Then click on Save
Getting the Hasura project
$ hasura quickstart dvk/git-issue-bot $ cd slack-horoscope-bot # Add Github credentials to hasura secrets. $hasura secrets update username.key <Your bot account username> $ hasura secrets update password.key <Your bot account password> # Deploy $ git add . && git commit -m "Deployment commit" $ git push hasura master
Viewing bot in action
Just create an issue or close and issue, you will see the bot in action.
Congratulations you have succesfully deployed the slack horoscope bot.
Modifying the bot
Head over to microservices/bot/src/ And start editing server.js Soon enough you will have your node js slack bot ready
Happy Developing :) Divyanshu Kumar