A webhook filter for Deno that filters GitHub events before forwarding them to a Discord webhook
MIT License
A webhook filter for Deno that filters GitHub events before forwarding them to a Discord webhook, reducing noise. Additionally, it attempts to handle Discord ratelimits and resend the webhook events if needed, instead of just dropping the requests like GitHub does.
Certain no-op events (which Discord would ignore anyway) and common CI bots are ignored by default; see configuration below for more.
lib/config.ts
.https://discord.com/api/webhooks/1234/ABCDWXYZ
).1234
) and token (ABCDWXYZ
) from the URL, and enterhttps://<filter_url>/1234/ABCDWXYZ
(note: no /github
) in the GitHub webhook settings:?allowBranches=master,dev&hideTags=1
.Additional options can be configured per URL:
allowBranches
, simplified wildcard syntax)
abc*xyz
is equivalent to /^(abc.*xyz)$/
stuff,things
is equivalent to /^(stuff|things)$/
!oh*hi*there
is equivalent to /^(oh.*hi.*there)$/
invertedhideTags
)commentBurstLimit
)