Skip to content

Commit 3bde297

Browse files
authored
[API] pull notification subject status: add "merged" (#15344) (#15654)
Current subject status can be "", "open" and "closed". This add "merged" to it.
1 parent 0dfde36 commit 3bde297

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/convert/notification.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
4747
if err == nil && comment != nil {
4848
result.Subject.LatestCommentURL = comment.APIURL()
4949
}
50+
51+
pr, _ := n.Issue.GetPullRequest()
52+
if pr != nil && pr.HasMerged {
53+
result.Subject.State = "merged"
54+
}
5055
}
5156
case models.NotificationSourceCommit:
5257
result.Subject = &api.NotificationSubject{

0 commit comments

Comments
 (0)