Skip to content

Fix discord webhook 400 status code when description limit is exceeded (#34084) #34124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 5, 2025

Conversation

GiteaBot
Copy link
Collaborator

@GiteaBot GiteaBot commented Apr 4, 2025

Backport #34084 by @Mopcho

Fixes #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.

go-gitea#34084)

Fixes [go-gitea#34027](go-gitea#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: wxiaoguang <[email protected]>
@GiteaBot GiteaBot added modifies/go Pull requests that update Go code type/bug labels Apr 4, 2025
@GiteaBot GiteaBot requested review from lunny and wxiaoguang April 4, 2025 23:19
@GiteaBot GiteaBot added this to the 1.23.7 milestone Apr 4, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Apr 4, 2025
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Apr 4, 2025
@pull-request-size pull-request-size bot added size/S and removed size/XS labels Apr 5, 2025
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Apr 5, 2025
@lunny lunny enabled auto-merge (squash) April 5, 2025 01:57
@lunny lunny merged commit 66ccae8 into go-gitea:release/v1.23 Apr 5, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants