GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - shiftinv/github-webhook-filter: A webhook filter for Deno that filters GitHub events before forwarding them to a Discord webhook

BranchesTags
Open more actions menu

Latest commit

 

History

93 Commits
93 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
scripts
scripts
 
 
src
src
 
 
.dockerignore
.dockerignore
 
 
.env.example
.env.example
 
 
.gitignore
.gitignore
 
 
.pre-commit-config.yaml
.pre-commit-config.yaml
 
 
Dockerfile
Dockerfile
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
deno.json
deno.json
 
 
deno.lock
deno.lock
 
 
docker-compose.yml
docker-compose.yml
 
 

Repository files navigation

github-webhook-filter

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.

Usage

  1. Host the project somewhere, for example https://deno.com/deploy. Remember to add the environment variables you may want to set, see src/config.ts.
  2. Create a Discord webhook (https://discord.com/api/webhooks/1234/ABCDWXYZ).
  3. Take the ID (1234) and token (ABCDWXYZ) from the URL, and enter https://<filter_url>/1234/ABCDWXYZ (note: no /github) in the GitHub webhook settings:
    settings
  4. Optionally add configuration parameters (see below) to the URL, e.g. ?allowBranches=master|dev&hideTags=1

Configuration

Additional options can be configured per URL:

  • allowBranches: Only forward events from specific branches
    • This is case-sensitive and supports regex
    • Only full matches are considered, i.e. no substrings; abc.*xyz is equivalent to /^(abc.*xyz)$/
  • allowBots: Forward events from bots
    • Accepts a bool (1, 0, true, false) or a regex (see allowBranches for supported values)
    • If unset, ignores events only from common CI bots1, unless the branch is explicitly allowed
  • hideTags: Ignore tag updates
  • commentBurstLimit: Ignore burst PR review comments in a short timespan, only showing the first x comments per review

Footnotes

  1. coveralls[bot], netlify[bot], pre-commit-ci[bot], dependabot[bot] ↩

About

A webhook filter for Deno that filters GitHub events before forwarding them to a Discord webhook

Topics

denodiscordwebhook

Resources

Readme
MIT license
Activity

Stars

10 stars

Watchers

1 watching

Forks

6 forks
Report repository

Contributors

Languages

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.