filter & redirect github webhooks
the following environment variables are required:
GITHUB_WEBHOOK_SECRET
: the secret you chose when you created the json webhookDISCORD_WEBHOOK
: the regular discord webhook urlDISCORD_BOT_WEBHOOK
: the discord webhook url for bot-authored eventsDISCORD_USERSTYLES_WEBHOOK
: the discord webhook url for all non-bot events on catppuccin/userstyles.DISCORD_ERROR_WEBHOOK
: the discord webhook url for errors
the following environment variables are optional:
PORT
: the port to listen on (default: 3000)
To learn how to forward webhook events to a local instance of rockdove, follow the instructions below:
-
Ensure your
.envrc
has the environment variables listed above in the configuration section. -
Compile a release build of rockdove and run it:
cargo build --release ./target/release/rockdove
-
Install the
gh
cli webhook forward extension:gh extension install cli/gh-webhook
-
Allow
gh cli
to create organisation webhooks on your behalf:gh auth refresh -h github.com -s admin:org_hook
-
Forward the webhook events to your local instance of rockdove:
gh webhook forward --events='*' --org=catppuccin --url="http://localhost:3000/webhook"
-
Finally, visit the GitHub webhook settings and paste the
GITHUB_WEBHOOK_SECRET
into the newly created development webhook.