Skip to content

Instantly share code, notes, and snippets.

@jagrosh
Last active December 4, 2025 07:09
Show Gist options
  • Select an option

  • Save jagrosh/5b1761213e33fc5b54ec7f6379034a22 to your computer and use it in GitHub Desktop.

Select an option

Save jagrosh/5b1761213e33fc5b54ec7f6379034a22 to your computer and use it in GitHub Desktop.
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings

  2. Select Add Webhook Add

  3. Paste in the webhook url and append /github to the end. Select "Send me everything", set the type to application/json, and then Add Webhook WebhookSettings

  4. Test it by updating something or starring the repository! If it works, you're all set! Star

@qtqgyt
Copy link

qtqgyt commented Jul 15, 2025

Do you have any more questions for the noob?

I don't understand.

@mStirner
Copy link

Why is /github at the end of the URL needed?
Got it working with it, but not without it.

@malmeloo
Copy link

Why is /github at the end of the URL needed? Got it working with it, but not without it.

GitHub sends webooks in a certain format, but Discord expects webhook payloads to be formatted differently. This is why the default webhook URL will not work. So to make it easier to connect GitHub webhooks to Discord channels, Discord added an additional endpoint (/github) that accepts payloads formatted in the same way that GitHub sends them.

@mStirner
Copy link

Makes sense.
I wondered how discord know which property to display as message/parses the json payload.

Is documented here: https://support.discord.com/hc/en/articles/228383668

Thanks!

@deufrai
Copy link

deufrai commented Oct 24, 2025

thanks! Saved me a lot of hassle

@1lAaN
Copy link

1lAaN commented Nov 21, 2025

is it possible to add a "@everyone" mention ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment