No description
- Go 97.1%
- Makefile 2.9%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
Forgejo webhook payloads use lowercase/snake_case keys ("ref",
"repository", "full_name", "total_commits", etc.), not PascalCase.
The default templates referenced fields like .Repository.FullName and
.Ref, which failed at render time with 'invalid value; expected string'
because those keys don't exist in the unmarshalled map.
Changed all template field references to match Forgejo's actual format:
- repository.full_name, ref, pusher.username, total_commits,
commits[].id, commits[].message, sender.username, etc.
- .pusher.username instead of .pusher.full_name (full_name is often
empty for token-auth pushes)
Added tests using real Forgejo payload data and a token-auth edge case
where pusher.full_name is empty.
|
||
| docs/superpowers | ||
| .gitignore | ||
| config.go | ||
| config_test.go | ||
| display_test.go | ||
| go.mod | ||
| go.sum | ||
| Makefile | ||
| plugin.go | ||
| README.md | ||
| render.go | ||
| render_test.go | ||
| templates.go | ||
| templates_test.go | ||
| webhook.go | ||
| webhook_test.go | ||
gotify-forgejo
A Gotify plugin that receives Forgejo webhook notifications and forwards them as Gotify messages with per-event-type templates and priorities.
Features
- All Forgejo webhook events supported (push, pull_request, issues, releases, etc.)
- HMAC-SHA256 signature validation
- Per-event-type Go templates for title and body
- Per-event-type notification priority
- YAML configuration via the Gotify WebUI
Building
Requires Docker. Build for Gotify v3.1.0:
make build
The resulting gotify-forgejo-linux-amd64-for-gotify-v3.1.0.so goes in Gotify's plugin directory.
Setup
- Copy the
.sointo your Gotify plugin directory and restart Gotify. - Set the
secretin the plugin config. - Enable the plugin for your user in the WebUI.
- Point your Forgejo webhook at the URL shown on the plugin page.
Note: the secret is required. The plugin cannot be enabled until a non-empty
secretis saved — enabling before configuring it returns an error.