forgejo/services/webhook
Gusted 94845020e8 feat: add commit limit for webhook payload (#6797)
- Adds a new option `[webhook].PAYLOAD_COMMIT_LIMIT` that limits the amount of commits is sent for each webhook payload, this was previously done via `[ui].FEED_MAX_COMMIT_NUM` which feels incorrect.
- The default is 15 for this new option, purely arbitary.
- Resolves forgejo/forgejo#6780
- Added unit testing, it's quite a lot because this the notification
area is not really easy to test and rather should've been a integration test
but that ends up having more complicated than trying doing an unit test.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/6797
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: 0ko <0ko@noreply.codeberg.org>
Co-authored-by: Gusted <postmaster@gusted.xyz>
Co-committed-by: Gusted <postmaster@gusted.xyz>
2025-02-07 19:26:50 +00:00
..
shared [FEAT] sourcehut webhooks 2024-04-05 10:20:40 +02:00
sourcehut sourcehut: use ssh sources URL when appropriate 2025-01-01 19:46:05 +01:00
TestPushCommits feat: add commit limit for webhook payload (#6797) 2025-02-07 19:26:50 +00:00
default.go chore: fix typos identified by mispell 2024-05-25 09:43:50 +02:00
default_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
deliver.go Support allowed hosts for migrations to work with proxy (#32025) 2024-09-14 17:52:54 +02:00
deliver_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
dingtalk.go style: reenable switch check 2024-08-18 15:19:01 +02:00
dingtalk_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
discord.go Escaping specific markdown in commit messages on Discord-type embeds #3664 (#5811) 2024-11-18 21:47:11 +00:00
discord_test.go Escaping specific markdown in commit messages on Discord-type embeds #3664 (#5811) 2024-11-18 21:47:11 +00:00
feishu.go [REFACTOR] webhook shared code to prevent import cycles 2024-04-04 08:24:33 +02:00
feishu_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
general.go [REFACTOR] webhook shared code to prevent import cycles 2024-04-04 08:24:33 +02:00
general_test.go Escaping specific markdown in commit messages on Discord-type embeds #3664 (#5811) 2024-11-18 21:47:11 +00:00
gogs.go [REFACTOR] webhook shared code to prevent import cycles 2024-04-04 08:24:33 +02:00
main_test.go tests: improve actvititypub integration test code 2024-11-01 22:39:49 +01:00
matrix.go style: reenable switch check 2024-08-18 15:19:01 +02:00
matrix_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
msteams.go style: reenable switch check 2024-08-18 15:19:01 +02:00
msteams_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
notifier.go feat: add commit limit for webhook payload (#6797) 2025-02-07 19:26:50 +00:00
notifier_test.go feat: add commit limit for webhook payload (#6797) 2025-02-07 19:26:50 +00:00
packagist.go [REFACTOR] webhook shared code to prevent import cycles 2024-04-04 08:24:33 +02:00
packagist_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
slack.go [CHORE] Use forked binding library 2024-11-05 22:47:34 +01:00
slack_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
telegram.go style: reenable switch check 2024-08-18 15:19:01 +02:00
telegram_test.go Add testifylint to lint checks (#4535) 2024-07-30 19:41:10 +00:00
webhook.go webhook: fix getPayloadBranch 2024-04-30 09:38:35 +02:00
webhook_test.go Test webhook email (#33033) 2025-01-05 12:00:26 +00:00
wechatwork.go style: reenable switch check 2024-08-18 15:19:01 +02:00