gitea/services/webhook
Giteabot 66ccae8b90
Fix discord webhook 400 status code when description limit is exceeded (#34084) (#34124)
Backport #34084 by @Mopcho

Fixes [#34027](https://github.com/go-gitea/gitea/issues/34027)

Discord does not allow for description bigger than 2048 bytes. If the
description is bigger than that it will throw 400 and the event won't
appear in discord. To fix that, in the createPayload method we now slice
the description to ensure it doesn’t exceed the limit.

---------

Co-authored-by: Mopcho <47301161+Mopcho@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2025-04-05 02:08:04 +00:00
..
deliver.go Support allowed hosts for migrations to work with proxy (#32025) 2024-09-11 05:47:00 +00:00
deliver_test.go Fix possible data race on tests (#30093) 2024-03-26 14:08:30 +00:00
dingtalk.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
dingtalk_test.go Store webhook event in database (#29145) 2024-03-07 23:18:38 +01:00
discord.go Fix discord webhook 400 status code when description limit is exceeded (#34084) (#34124) 2025-04-05 02:08:04 +00:00
discord_test.go Only provide the commit summary for Discord webhook push events (#32432) 2024-11-07 19:56:53 +00:00
feishu.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
feishu_test.go Store webhook event in database (#29145) 2024-03-07 23:18:38 +01:00
general.go Adjust appearence of commit status webhook (#33778) (#33789) 2025-03-04 12:47:05 -08:00
general_test.go Add tests for webhook and fix some webhook bugs (#33396) (#33442) 2025-02-02 14:44:50 +08:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
matrix.go Adjust appearence of commit status webhook (#33778) (#33789) 2025-03-04 12:47:05 -08:00
matrix_test.go Store webhook event in database (#29145) 2024-03-07 23:18:38 +01:00
msteams.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
msteams_test.go Store webhook event in database (#29145) 2024-03-07 23:18:38 +01:00
notifier.go Make actions URL in commit status webhooks absolute (#33620) (#33632) 2025-02-18 02:46:08 +00:00
packagist.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
packagist_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
payloader.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
slack.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
slack_test.go Store webhook event in database (#29145) 2024-03-07 23:18:38 +01:00
telegram.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00
telegram_test.go Refactor webhook (#31587) 2024-07-10 11:37:16 +00:00
webhook.go Add tests for webhook and fix some webhook bugs (#33396) (#33442) 2025-02-02 14:44:50 +08:00
webhook_test.go Enable tenv and testifylint rules (#32852) 2024-12-15 10:41:29 +00:00
wechatwork.go Fix commit status events (#33320) (#33493) 2025-02-05 11:35:47 +08:00