Skip to content

Instantly share code, notes, and snippets.

@NikanWasTaken
Last active April 9, 2024 05:19
Show Gist options
  • Save NikanWasTaken/c5154738fcb04456a199177933d6edbf to your computer and use it in GitHub Desktop.
Save NikanWasTaken/c5154738fcb04456a199177933d6edbf to your computer and use it in GitHub Desktop.
Creating Github webhook logs with discord forums

1. Create a forums channel in your Discord server

Create a forums channel in your discord server, and deny create posts and send messages in posts permissions for @everyone

picture

picture

2. Create a webhook under the forums channel

Go to the channel settings, integrations, webhooks, create webhook, click copy webhook URL and save it somewhere so we can use it later!

picture

3. Make individual posts for your Github repositories

Create a post in the forums channel for a Github repository that you want to receive updates for. Make sure that Developer Mode is enabled. Copy the created post's id and save it somewhere so we can use it later!

Copy the POST'S ID, not the forums channel's ID!

4. Add a webhook to your Github repository

Go to your repository in Github, select the settings tab, webhooks, and add webhook!

image

  1. Click Add webhook

  2. Pass in WEBHOOK_URL/github?thread_id=POST_ID in the payload url. (replace WEBHOOK_URL and POST_ID with the ones you saved before)

  3. Select application/json for the content type

  4. Click Add webhook when you are done

picture

Boom! You now have a working Github log made with forums.

@src-ry
Copy link

src-ry commented Mar 25, 2023

yoo thanks!

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