gitforge/services/webhook
Antonin Delpeuch 12cfb4beb5 fix: allow test delivery for webhooks not enabled for push events (#11073)
Webhooks not enabled for push events cannot be tested using the
"Test delivery" button, because the built-in test payload corresponds
to a push event and is therefore filtered out at delivery time if the
webhook isn't configured to trigger for such events.

This fixes it by delivering the payload for a push event regardless
of the webhook's configuration. This has the downside of delivering
a payload which isn't necessarily representative of what the webhook
will deliver for real, but it would be a significant effort to implement
test payloads for all possible event types. We leave this as a follow-up
improvement.

Fixes #7934.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/11073
Reviewed-by: oliverpool <oliverpool@noreply.codeberg.org>
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: Antonin Delpeuch <antonin@delpeuch.eu>
Co-committed-by: Antonin Delpeuch <antonin@delpeuch.eu>
2026-01-27 23:19:34 +01:00
..
shared
sourcehut chore: remove branding from context imports (#9628) 2025-10-11 01:52:51 +02:00
TestPushCommits
default.go
default_test.go
deliver.go
deliver_test.go feat: use keying for webhook secrets (#10059) 2025-12-22 15:51:37 +01:00
dingtalk.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
dingtalk_test.go
discord.go feat: improve Discord webhook message formatting (#10626) 2025-12-30 18:01:17 +01:00
discord_test.go feat: improve Discord webhook message formatting (#10626) 2025-12-30 18:01:17 +01:00
feishu.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
feishu_test.go
general.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
general_test.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
gogs.go
main_test.go chore: move all test blank imports in a single package (#10662) 2026-01-02 05:32:32 +01:00
matrix.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
matrix_test.go
msteams.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
msteams_test.go
notifier.go
notifier_test.go
packagist.go
packagist_test.go
slack.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
slack_test.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
telegram.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00
telegram_test.go
webhook.go fix: allow test delivery for webhooks not enabled for push events (#11073) 2026-01-27 23:19:34 +01:00
webhook_test.go fix: allow test delivery for webhooks not enabled for push events (#11073) 2026-01-27 23:19:34 +01:00
wechatwork.go feat: place user names into inline code blocks for Slack (#10147) 2025-11-25 23:24:05 +01:00