11# disgit
2- A cloudflare worker script which provides better github->discord webhooks than the built in discord webhook executor.
2+ A Cloudflare Worker which provides better GitHub->Discord webhook integration than the built-in Discord webhook executor.
3+
4+ You can use this Cloudflare worker by following the steps after clicking the button below
5+
6+ [ ![ Deploy to Cloudflare Workers] ( https://deploy.workers.cloudflare.com/button )] ( https://deploy.workers.cloudflare.com/?url=https://github.com/JRoy/disgit )
7+
38
49This repository is based on [ JRoy/disgit] ( https://github.com/JRoy/disgit ) , deploying to IntellectualSites' CF workers via GitHub actions.
510
@@ -12,14 +17,13 @@ The following webhook events are supported as of now;
1217* [ deployment] ( https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment )
1318* [ deployment_status] ( https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#deployment_status )
1419* [ discussion] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#discussion )
15- * Event is invite-only (at time of writing) and needs to be manually selected in webhook settings
1620* [ discussion_comment] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#discussion_comment )
17- * Event is invite-only (at time of writing) and needs to be manually selected in webhook settings
1821* [ fork] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#fork )
1922* [ gollum] ( https://docs.github.com/en/developers/webhooks-and-events/webhooks/webhook-events-and-payloads#gollum ) (wiki)
2023* [ issue_comment] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issue_comment )
2124 * This event also sends pull request comments...* sigh*
2225* [ issues] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#issues )
26+ * [ package] ( https://docs.github.com/en/webhooks-and-events/webhooks/webhook-events-and-payloads#package )
2327* [ ping] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#ping )
2428* [ pull_request] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request )
2529* [ pull_request_review] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request_review )
@@ -28,22 +32,3 @@ The following webhook events are supported as of now;
2832* [ release] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#release )
2933* [ star] ( https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#star )
3034* ...feel free to contribute more that suit your needs!
31-
32- ## Installation
33- 1 . Go to your cloudflare worker dashboard by clicking [ here] ( https://dash.cloudflare.com/?to=/:account/workers )
34- and create a new worker.
35- 1 . Copy all the code from [ disgit.js] ( https://github.com/JRoy/disgit/blob/master/disgit.js ) and paste it into
36- the script window of your worker.
37- 1 . Click ` Save and Deploy ` and confirm your deployment.
38- 1 . Create a new webhook in your GitHub repository/organization settings.
39- 1 . Paste your worker's url into the ` Payload URL ` field and append ` (webhook id)/(webhook token) ` to the end.
40- * For example if you had the worker url ` https://my-worker.test.workers.dev ` and the discord webhook url
41- ` https://discord.com/api/webhooks/840438712203557422/8H3D57RQzftJmhw9VfEaLFLABjItuDScjU-c_nYKffb1hTlktLapwd ` ,
42- the payload url you should have in the GitHub webhook form is
43- ` https://my-worker.test.workers.dev/840438712203557422/8H3D57RQzftJmhw9VfEaLFLABjItuDScjU-c_nYKffb1hTlktLapwd ` .
44- 1 . Set the ` Content type ` to ` application/json `
45- 1 . You can configure the events to whichever you would like to receive. * Remember that some events require you to
46- explicitly pick them in "` Let me select individual events ` " and will not send with the "` Send my everything ` "
47- option.*
48- 1 . Click ` Add webhook ` .
49- 1 . That's it, you're all setup, and your webhooks should start coming in.
0 commit comments