DEV Community

Jasper Aurelio Villas
Jasper Aurelio Villas

Posted on

Github notification - webhooks

To send GitHub notifications (like pushes, issues, pull requests, etc.) to a Discord channel, the most common and reliable way is using a Webhook. Here's how you can set that up:

✅ Step-by-step: GitHub → Discord Webhook
1 Create a Webhook in Discord
Go to your Discord server.

2.Click the gear icon ⚙️ next to the channel you want GitHub messages to go to.

3.Go to Integrations > Webhooks.

4.Click “New Webhook”.

5.Give it a name (e.g., GitHub Bot) and copy the Webhook URL.

6.Save changes.


2 Set up Webhook on GitHub

1.Go to your GitHub repository.

2.Click Settings > Webhooks.

3.Click “Add webhook”.

4.In the Payload URL, paste the Discord Webhook URL.

5.Set Content type to: application/json

6.In “Which events would you like to trigger this webhook?”, choose:

  • ✅ Let me select individual events

  • Select things like:

    • Pushes
    • Pull requests
    • Issues
    • Or whatever else you care about

7.Leave SSL verification enabled (recommended).

8.Click “Add webhook”.


📬 Done!
Now, any selected events (like new pushes or PRs) will show up in your Discord channel.


🛠 Optional: Use GitHub Actions for custom formatting
If you want nicer messages (with embeds, colors, formatting), you can create a GitHub Action to POST custom messages to the Discord webhook. Let me know if you want help with that setup.

Top comments (0)