0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-12-24 08:06:49 -05:00
forgejo/services/webhook
zeripath d6fa138e7c
Only send webhook events to active system webhooks and only deliver to active hooks (#19234)
There is a bug in the system webhooks whereby the active state is not checked when
webhooks are prepared and there is a bug that deactivating webhooks do not prevent
queued deliveries.

* Only add SystemWebhooks to the prepareWebhooks list if they are active
* At the time of delivery if the underlying webhook is not active mark it
as "delivered" but with a failed delivery so it does not get delivered.

Fix #19220

Signed-off-by: Andrew Thornton <art27@cantab.net>

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2022-03-28 11:17:21 +08:00
..
deliver.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2022-03-28 11:17:21 +08:00
deliver_test.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
dingtalk.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
dingtalk_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
discord.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
discord_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
feishu.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
feishu_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
general.go Simplify parameter types (#18006) 2021-12-20 04:41:31 +00:00
general_test.go Add tests for all webhooks (#16214) 2021-06-20 22:12:19 -04:00
main_test.go Add missing X-Total-Count and fix some related bugs (#17968) 2021-12-15 13:39:34 +08:00
matrix.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
matrix_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
msteams.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
msteams_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
packagist.go Add packagist webhook (#18224) 2022-01-23 21:46:30 +08:00
packagist_test.go Add packagist webhook (#18224) 2022-01-23 21:46:30 +08:00
payloader.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
slack.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
slack_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
telegram.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00
telegram_test.go Move webhook into models/webhook/ (#17579) 2021-11-10 13:13:16 +08:00
webhook.go Only send webhook events to active system webhooks and only deliver to active hooks (#19234) 2022-03-28 11:17:21 +08:00
webhook_test.go Move repository model into models/repo (#17933) 2021-12-10 09:27:50 +08:00
wechatwork.go format with gofumpt (#18184) 2022-01-20 18:46:10 +01:00