Simple Api to handle GitHub webhooks and redirect them beautiful to Discord
- clone the repository on your server:
git clone https://github.com/jxstxn1/Github-Webhook.git
- get used dependencies:
npm i
- enter your Discord Webhook URL into the hook var in the github class
nano routes/github.js
or
vim routes/github.js
or
vi routes/github.js
-
In your Firewall Settings of the Server open Port 3000 which is required for the API
-
Setting up the Webhook in Github: In your reposotory or organisatiopm go to Settings>Webhooks>Add Webhook Enter into the Payload URL the ip of your server + the port and the route. In the End it should look like: 11.11.111.11:3000/github Use as Content Type: Application/json Secret not supported yet Choose between one of the 3 event options Make sure the Active Checkbox is settet Click on "Add webhook"
Now you're good to go :)
- MIT LICENSE