Skip to content

fix(webhook/discord): fixed username cannot be empty error#35412

Merged
lunny merged 2 commits into
go-gitea:mainfrom
ulnanlu:fix-discord-webhook
Sep 5, 2025
Merged

fix(webhook/discord): fixed username cannot be empty error#35412
lunny merged 2 commits into
go-gitea:mainfrom
ulnanlu:fix-discord-webhook

Conversation

@ulnanlu

@ulnanlu ulnanlu commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

username field is not required by discord and used to override the default username. sending it as blank causes a 400 error. it should be omitted instead when it's not set.

Ref: https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

Closes #35411

… webhook

username field is not required by discord so sending it as blank causes a 400 error. it should be omitted instead when it's not set.

Closes #35411
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 5, 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 Sep 5, 2025
@techknowlogick techknowlogick added type/bug outdated/backport/v1.24 This PR should be backported to Gitea 1.24 labels Sep 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 Sep 5, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 5, 2025
@lunny lunny merged commit 09d1f35 into go-gitea:main Sep 5, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.26.0 milestone Sep 5, 2025
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 5, 2025
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Sep 5, 2025
…35412)

username field is not required by discord and used to override the
default username. sending it as blank causes a 400 error. it should be
omitted instead when it's not set.

Ref:
https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

Closes go-gitea#35411
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Sep 5, 2025
silverwind pushed a commit that referenced this pull request Sep 5, 2025
…35417)

Backport #35412 by @ulnanlu

username field is not required by discord and used to override the
default username. sending it as blank causes a 400 error. it should be
omitted instead when it's not set.

Ref:
https://discord.com/developers/docs/resources/webhook#execute-webhook-jsonform-params

Closes #35411

Co-authored-by: ulnanlu <220980518+ulnanlu@users.noreply.github.com>
@ulnanlu ulnanlu deleted the fix-discord-webhook branch September 6, 2025 11:12
@lunny lunny modified the milestones: 1.26.0, 1.25.0 Sep 7, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 8, 2025
* giteaofficial/main:
  fix: add author.name field to Swift Package Registry API response (go-gitea#35410)
  Update js dependencies (go-gitea#35429)
  Support Node.js 22.6 with type stripping (go-gitea#35427)
  [skip ci] Updated translations via Crowdin
  apply as maintainer (go-gitea#35424)
  Upgrade golang to 1.25.1 and add descriptions for the swagger structs' fields (go-gitea#35418)
  Migrate tools and configs to typescript, require node.js >= 22.18.0 (go-gitea#35421)
  [skip ci] Updated translations via Crowdin
  Switch to `@resvg/resvg-wasm` for `generate-images` (go-gitea#35415)
  fix(webhook/discord): fixed username cannot be empty error (go-gitea#35412)
  add `/.pnpm-store` to .gitignore (go-gitea#35414)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/done All backports for this PR have been created lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. outdated/backport/v1.24 This PR should be backported to Gitea 1.24 type/bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discord webhook sends a blank username property when username is not set causing a 400 error

5 participants