mirror of
https://github.com/go-gitea/gitea.git
synced 2025-07-22 21:35:21 +02:00
Trim away CR character if it exists
This is in-line with what our other webhook implementations do.
This commit is contained in:
parent
21587137b9
commit
af276c5b54
@ -155,7 +155,7 @@ func (d discordConvertor) Push(p *api.PushPayload) (DiscordPayload, error) {
|
||||
// for each commit, generate attachment text
|
||||
for i, commit := range p.Commits {
|
||||
// limit the commit message display to just the summary, otherwise it would be hard to read
|
||||
message := strings.Split(commit.Message, "\n")[0]
|
||||
message := strings.TrimRight(strings.Split(commit.Message, "\n")[0], "\r")
|
||||
|
||||
// a limit of 50 is set because GitHub does the same
|
||||
if len(message) > 50 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user