Step-by-Step Guide to Setting Up GitHub to Discord Webhooks
By Collin Herber | 2023-11-24 | 3 min read
Looking to get GitHub updates in your Discord chat? This quick guide has you covered on setting up a webhook that’ll bring your code pushes and pull requests straight into your favorite server, keeping your team in the loop with every commit.
Create the Github Webhook in your Repository/Organization
- Ensure you have the ‘Manage Webhooks’ permission on your Discord server.
- Open the server settings by clicking on the server name at the top right, then select ‘Server Settings’ from the dropdown menu.
- In the sidebar, click on ‘Integrations’, then select ‘Webhooks’.
- Click on the ‘Create Webhook’ button (or ‘New Webhook’ if you have existing webhooks).
- Name your webhook and select the channel you want messages to be posted to.
- Optionally, set a profile picture for the webhook.
- Copy the Webhook URL for later use.
Creating a GitHub Webhook for Discord Notifications:
- After creating a Discord webhook, go to your GitHub repository’s settings.
- Click on ‘Webhooks’, then ‘Add webhook’.
- Paste the Discord webhook URL in the ‘Payload URL’ field and append
/github
to it. - Set the ‘Content type’ to ‘application/json’.
- Select the events that should trigger the webhook notifications.
- Click ‘Add webhook’ to complete the process.
Testing the GitHub Webhook
- Perform an action like creating an issue in the GitHub repository you set the webhook for.
- You should receive a notification in your Discord channel.
- The same will occur for other events like push commits or pull requests.
This guide should help you set up Discord and GitHub webhooks to receive notifications in your Discord server. Remember to adjust webhook settings according to your needs, like filtering specific events from GitHub to Discord.