Skip to content

Commit f37de47

Browse files
committed
Use commit title instead in notification
1 parent df24a1f commit f37de47

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/convert/notification.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package convert
66
import (
77
"context"
88
"net/url"
9-
"strings"
109

1110
activities_model "code.gitea.io/gitea/models/activities"
1211
"code.gitea.io/gitea/models/perm"
@@ -70,9 +69,10 @@ func ToNotificationThread(ctx context.Context, n *activities_model.Notification)
7069
}
7170
case activities_model.NotificationSourceCommit:
7271
url := n.Repository.HTMLURL() + "/commit/" + url.PathEscape(n.CommitID)
72+
title, _ := utils.SplitCommitTitleBody(n.Commit.CommitMessage)
7373
result.Subject = &api.NotificationSubject{
7474
Type: api.NotifySubjectCommit,
75-
Title: strings.TrimSpace(n.Commit.CommitMessage),
75+
Title: title,
7676
URL: url,
7777
HTMLURL: url,
7878
}

0 commit comments

Comments
 (0)