From: 6543 <6543@obermui.de> Date: Fri, 9 Apr 2021 01:36:23 +0000 (+0200) Subject: [API] pull notification subject status: add "merged" (#15344) X-Git-Tag: v1.15.0-rc1~501 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=147826a57750f6e8120fe3bfb350cde61734969c;p=gitea.git [API] pull notification subject status: add "merged" (#15344) Current subject status can be "", "open" and "closed". This add "merged" to it. --- diff --git a/modules/convert/notification.go b/modules/convert/notification.go index 49abe01253..cc941678b6 100644 --- a/modules/convert/notification.go +++ b/modules/convert/notification.go @@ -47,6 +47,11 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread { if err == nil && comment != nil { result.Subject.LatestCommentURL = comment.APIURL() } + + pr, _ := n.Issue.GetPullRequest() + if pr != nil && pr.HasMerged { + result.Subject.State = "merged" + } } case models.NotificationSourceCommit: result.Subject = &api.NotificationSubject{