Converts GitHub webhooks to nicely formatted Discord webhooks.
- Uses nicer formatted messages that is more in line with GitHubs UI style, using Octicons as Discord emojis and GitHubs color scheme.
- Edits previous Discord messages on updates instead of spamming new ones. (example)
Supported events compared to Discords GitHub compatible webhook endpoint
| Event | Supported by Discord | Supported |
|---|---|---|
branch_protection_configuration |
❌ | ❌ |
branch_protection_rule |
❌ | ❌ |
check_run |
✅ | ❌ |
check_suite |
✅ | ❌ |
code_scanning_alert |
❌ | ❌ |
commit_comment |
âś… | âś… |
create |
âś… | âś… |
custom_property |
❌ | ❌ |
custom_property_values |
❌ | ❌ |
delete |
✅ | ❌ |
dependabot_alert |
❌ | ❌ |
deploy_key |
❌ | ❌ |
deployment |
❌ | ❌ |
deployment_protection_rule |
❌ | ❌ |
deployment_review |
❌ | ❌ |
deployment_status |
❌ | ❌ |
discussion |
âś… | âś… |
discussion_comment |
âś… | âś… |
fork |
âś… | âś… |
github_app_authorization |
❌ | ❌ |
gollum |
❌ | ❌ |
installation |
❌ | ❌ |
installation_repositories |
❌ | ❌ |
installation_target |
❌ | ❌ |
issue_comment |
âś… | âś… |
issues |
âś… | âś… |
label |
❌ | ❌ |
marketplace_purchase |
❌ | ❌ |
member |
✅ | ❌ |
membership |
❌ | ❌ |
merge_group |
❌ | ❌ |
meta |
❌ | ❌ |
milestone |
❌ | ❌ |
org_block |
❌ | ❌ |
organization |
❌ | ❌ |
package |
❌ | ❌ |
page_build |
❌ | ❌ |
personal_access_token_request |
❌ | ❌ |
ping |
❌ | ❌ |
project_card |
❌ | ❌ |
project |
❌ | ❌ |
project_column |
❌ | ❌ |
projects_v2 |
❌ | ❌ |
projects_v2_item |
❌ | ❌ |
projects_v2_status_update |
❌ | ❌ |
public |
âś… | âś… |
pull_request |
âś… | âś… |
pull_request_review_comment |
✅ | ❌ |
pull_request_review |
âś… | âś… |
pull_request_review_thread |
❌ | ❌ |
push |
âś… | âś… |
registry_package |
❌ | ❌ |
release |
âś… | âś… |
repository_advisory |
❌ | ❌ |
repository |
❌ | ❌ |
repository_dispatch |
❌ | ❌ |
repository_import |
❌ | ❌ |
repository_ruleset |
❌ | ❌ |
repository_vulnerability_alert |
❌ | ❌ |
secret_scanning_alert |
❌ | ❌ |
secret_scanning_alert_location |
❌ | ❌ |
secret_scanning_scan |
❌ | ❌ |
security_advisory |
❌ | ❌ |
security_and_analysis |
❌ | ❌ |
sponsorship |
❌ | ❌ |
star |
❌ | ✅ |
status |
❌ | ❌ |
sub_issues |
❌ | ❌ |
team_add |
❌ | ❌ |
team |
❌ | ❌ |
watch |
✅ | ❌ |
workflow_dispatch |
❌ | ❌ |
workflow_job |
âś… | âś… |
workflow_run |
âś… | âś… |
All you need to do to use this yourself is to host the docker image.
Either start a container with a docker command:
docker run -d -p 3000:3000 ghcr.io/replaceitem/gh-dc-hook:latestor use docker-compose.yml:
services:
backend:
image: "ghcr.io/replaceitem/gh-dc-hook:latest"
ports:
- "3000:3000"The used emojis are from a private Discord server, but they will work with webhooks across Discord, without having access to the Discord server or creating the emojis yourself.
Docker images are provided through the GitHub container registry. They don't need any configuration through environment variables. You only need to map the exposed port 3000 to a host port.
Set up a discord webhook as usual and copy the webhook URL. It will look like this:
https://discord.com/api/webhooks/1234567890987654321/s0Me-s3CReT_t0k3n-y0U-Sh0uLd_n3v3R-r3Ve4L_uNd3R-4nY_c1RCuM5t4NC3s
Usually when setting this up with discord, you would need to append /github
to let Discord convert the GitHub webhook payload to the discord message content format.
To let gh-dc-hook handle the payload, you need to replace the discord.com
part of the URL with the domain where you deployed it:
https://example.org/api/webhooks/1234567890987654321/s0Me-s3CReT_t0k3n-y0U-Sh0uLd_n3v3R-r3Ve4L_uNd3R-4nY_c1RCuM5t4NC3s
This will send the event to gh-dc-hook instead, which will convert the payload to a Discord message first. It will then be sent to the Discord API with the same Webhook ID and token.


































