GitHub provides us with a way to allow other applications such as discord to connect it and receive POST requests whenever any action is done on your repository.
This can be useful if you find the email notifications not as instant as you'd want them to be.
- You need to have a GitHub account with a repository.
- You need to have a discord server where we will add the webhook.
A webhook is basically a link that will allow other applications to post into discord.
To create a webhook, head into your
server settings =>
You can give your webhook a name and also choose which channel it will be posting to. You can click on
Copy Webhook URL to copy the link which we are going to use on our GitHub repository.
After creating the webhook the next thing is to add it to your github repository from which you would like to get notifications.
Head over to your repo then
Paste the link we copied earlier from discord in the
Payload URL and make sure to add
/github at the end or it will not work.
Content type to
application/json and finally choose the events which should trigger the webhook. Personally, I want everything.
After you are done you can click the green button at the bottom labeled
Add webhook to complete the process.
It will work the same way when pushing commits, creating PRs ...etc
Thank You for reading❤️. If you have any questions feel free to drop them in the comments section below and I'll be glad to answer them.