]> source.dussan.org Git - gitea.git/commit
Only provide the commit summary for Discord webhook push events (#32432)
authorKemal Zebari <60799661+kemzeb@users.noreply.github.com>
Thu, 7 Nov 2024 19:56:53 +0000 (11:56 -0800)
committerGitHub <noreply@github.com>
Thu, 7 Nov 2024 19:56:53 +0000 (19:56 +0000)
commitfb030624780f426472b8464aac0d50228f93017a
treef544b8ed1aff6ea01771bb2e5f8654954d734e2a
parent331e878e81d57235a53199383087c7649797a887
Only provide the commit summary for Discord webhook push events (#32432)

Resolves #32371.

#31970 should have just showed the commit summary, but
`strings.SplitN()` was misused such that we did not perform any
splitting at all and just used the message. This was not caught in the
unit test made in that PR since the test commit summary was > 50 (which
truncated away the commit description).

This snapshot resolves this and adds another unit test to ensure that we
only show the commit summary.
services/webhook/discord.go
services/webhook/discord_test.go
services/webhook/general_test.go