A Cloudflare Worker that sends Weblate webhooks to Discord webhooks. It's like a proxy that translates Weblate's webhook format into Discord's webhook format.
- Deploy the Cloudflare Worker using the button above or manually.
- Set the following environment variables in your Cloudflare Worker:
DISCORD_WEBHOOK_URL: The URL of your Discord webhook.WEBLATE_BASE_URL: The base URL of your Weblate instance (e.g.,https://weblate.example.com).
- In your Weblate instance, go to the project or instance settings and go to the Add-ons section.
- Enable the "Webhooks" add-on and configure it to point to your Cloudflare Worker URL, and select the events you want to be notified about. Optionally, set a secret in the Webhooks add-on for added security.
Currently, the worker handles the following Weblate events:
- Repository notification received
- Repository rebased
- String added in the repository
- String updated in the repository
- Translation changed
- Suggestion removed
- Changes committed
- Add-on configuration changed
- Add-on installed
- Add-on uninstalled
To prevent abuse, this worker:
- Checks the
User-Agentheader to ensure requests come from Weblate. - Checks the presence of the
Webhook-IdandWebhook-Timestampheaders. TheWebhook-Signatureheader may be empty, it depends if you set a secret in the Webhooks addon.
Webhook validation is not yet implemented.
This project is licensed under the MIT License. See the LICENSE.txt file for details.