DEV Community

Cover image for GitHub's notifications on your Discord Server
Gustavo Araújo
Gustavo Araújo

Posted on

GitHub's notifications on your Discord Server

I really love Discord and use it as a communication tool for personal projects with my friends and teammates. Sometimes I wonder: Do we have an App for Discord equivalent to GitHub App for Slack (former Pull Panda)?

So, I noticed that actually we don’t have it, for simple reasons: We can integrate GitHub Webhook to send events directly to Discord Webhook. Simple and functional. So, let's do it!

1. Create the Webhook

The first step is to create the Webhook on your Discord server to receive the events from GitHub:

  • Go to your discord Server Settings;
  • Click on the Integrations item on the sidebar;
  • Hit the Create Webhook button;
  • Fill the name field (I used GitHub Integration) and select a channel to post the messages;
  • Click on Save Changes button;
  • Then click on Copy Webhook URL.

Set up your webhook on Discord

2. Set up the Webhook on GitHub

Now, you’ll need to configure GitHub to send the events to Discord Webhook:

  • Navigate to your organization (or repository) on GitHub
  • Click the Settings tab;
  • Click the Webhooks item on sidebar;
  • Hit the Add Webhook button on the top of the page;
  • Fill the Payload URL field with the URL copied in the step above (Step 1);
  • Add /github at the end of the URL (It’s very important!);
  • In Content Type select Application/JSON;
  • You can leave the Secret field empty;
  • In Event Triggers if you select:
    • Just the push event you’ll receive new pushed commits.
    • Everything you’ll receive everything, like new Pull Requests opened, workflows, etc.
    • Let me select individual events you can choose.
  • Hit the Add Webhook button.

Create your webhook on GitHub

You’re all set! You’ll get GitHub events notifications on your Discord channel.

You're all set!

If you have any questions, you can reach me on Twitter, or you can just use the comments section below 🙂

I hope I was helpful, and thank you for reading.

Discussion (0)