disgit
A cloudflare worker script which provides better github->discord webhooks than the built in discord webhook executor.
Supported Events
The following webhook events are supported as of now;
- check_run
- commit_comment
- create
- delete
- deployment
- deployment_status
- discussion
- Event is invite-only (at time of writing) and needs to be manually selected in webhook settings
- discussion_comment
- Event is invite-only (at time of writing) and needs to be manually selected in webhook settings
- fork
- gollum (wiki)
- issue_comment
- This event also sends pull request comments...sigh
- issues
- ping
- pull_request
- pull_request_review
- pull_request_review_comment
- push
- release
- star
- ...feel free to contribute more that suit your needs!
Installation
- Go to your cloudflare worker dashboard by clicking here and create a new worker.
- Copy all the code from disgit.js and paste it into the script window of your worker.
- Click
Save and Deploy
and confirm your deployment. - Create a new webhook in your GitHub repository/organization settings.
- Paste your worker's url into the
Payload URL
field and append(webhook id)/(webhook token)
to the end.- For example if you had the worker url
https://my-worker.test.workers.dev
and the discord webhook urlhttps://discord.com/api/webhooks/840438712203557422/8H3D57RQzftJmhw9VfEaLFLABjItuDScjU-c_nYKffb1hTlktLapwd
, the payload url you should have in the GitHub webhook form ishttps://my-worker.test.workers.dev./840438712203557422/8H3D57RQzftJmhw9VfEaLFLABjItuDScjU-c_nYKffb1hTlktLapwd
.
- For example if you had the worker url
- Set the
Content type
toapplication/json
- You can configure the events to whichever you would like to receive. Remember that some events require you to
explicitly pick them in "
Let me select individual events
" and will not send with the "Send my everything
" option. - Click
Add webhook
. - That's it, you're all setup, and your webhooks should start coming in.