How to get GitHub Notifications in Discord Server?
Tags: github, discord, notifications, server
Published: 2021-09-06 17:32:02

Are you interested in receiving all of your GitHub notifications on your Discord server?

Here's how to do that.

We will go over how to get GitHub notifications in Discord Server in this article. Now, let's begin.

To begin, I'm assuming you have a Discord and GitHub account.

## Index 
- [Creating Discord Server](#creating-discord-server)
- [Creating GitHub Repo](#creating-github-repo)
- [Receiving Notifications](#receiving-notifications)
- [Testing](#testing)
- [Conclusion](#conclusion)



Let's start by creating a Discord Server.

## Creating Discord Server

1. In the bottom left corner, click on the `+` icon.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946055566/m-pAnrboT.png)

2. Once you've done that, click on `Create My Own.`
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946109862/TOpG6aoo9.png)

3. Choose `For me and my friends`
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946167461/x08rcpx1R.png)

4. Now, give your server a name. After that, select `Create`.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946207853/cwiArJIYZ.png)

Now, the discord server is ready, if you want to get Github Notification notices delivered to a separate text channel, you may create a new one.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946288159/ffCYO2ULD7.png)

Now, let's create a GitHub repo.

## Creating GitHub Repo

1. Click  [here](https://github.com/new)  to create a new GitHub repo.
2. Give your repo a name and click `Create Repository`.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630946658009/AJwWy0DU2.png)

Now, our GitHub repo is also ready, now, it's time to setup our Discord server to receive GitHub notifications.

## Receiving Notifications
1. Click on the ⚙️ icon just right of the text channel where you want to receive notifications.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947009103/xLK70-x7-.png)
2. Next, click on `Integrations` and then click on `Create Webhook`.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947068485/McNO4RyVX.png)
3. Now, a new webhook is created, if you want to change it's name, you can do so. But I'll leave it as it is.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947132745/vCeX8tlFI.png)
4. Then click on `Copy Webhook URL`. 
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947192465/xPutZlrAz.png)

Once the `Webhook URL` is copied, 
- Go to your GitHub repo and click on settings.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947267001/Dk8hNB62Xr.png)
- Then click on `Webhooks`.
- Next, click on `Add webhook`.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947353635/rOEgvDLLC.png)
Then you might need to confirm your password.
- Now add the `web hook` URL with `/github` on the end in `Payload URL`.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947548692/lEvjEKuv-.png)
- Now, set the content type to `application/json`.
- In the `Which events would you like to trigger this webhook?` section, select `Send me everything.` to receive every GitHub notification.
- Now click on `Add Webhook`, and now, you can receive all GitHub notifications in your discord server .🥳🥳🥳

> If everything was set up perfectly, then you should see the `green tick` on the webhook.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630947878896/9_5wrmAOP.png)

## Testing
For testing, let's clone the clone and push a commit.

1. Clone the repo
```bash
git clone https://github.com/YOUR_USERNAME/YOUR_REPO.git
```

2. Create a new random file, I will create `README.md` with following content.
```md
# Testing
```

3. Run the following commands
```bash
git add .
git commit -m "Added readme.md"
git branch -M main
git push -u origin main
```

4. Now, go to your discord server and you should see something like this.
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1630948385668/-_SuScrKJ.png)

## Conclusion

This was a short article on how to receive GitHub notification to your Discord Server. Hope you like this  article. If you got any problem or have any feedback or suggestion for me, comment it.

**Connect with me:**
- [Twitter](https://twitter.com/@chapagainashik) 
- [Polywork](https://polywork.com/projectashik)