Skip to content

Commit e13fbcd

Browse files
committed
Trim away CR character if it exists
This is in-line with what our other webhook implementations do.
1 parent 5530d01 commit e13fbcd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

services/webhook/discord.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ func (d discordConvertor) Push(p *api.PushPayload) (DiscordPayload, error) {
155155
// for each commit, generate attachment text
156156
for i, commit := range p.Commits {
157157
// limit the commit message display to just the summary, otherwise it would be hard to read
158-
message := strings.Split(commit.Message, "\n")[0]
158+
message := strings.TrimRight(strings.Split(commit.Message, "\n")[0], "\r")
159159

160160
// a limit of 50 is set because GitHub does the same
161161
if len(message) > 50 {

0 commit comments

Comments
 (0)