From 3bde29712169297a3356f4f55f3f3387878afa05 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Wed, 28 Apr 2021 21:24:56 +0200 Subject: [PATCH] [API] pull notification subject status: add "merged" (#15344) (#15654) Current subject status can be "", "open" and "closed". This add "merged" to it. --- modules/convert/notification.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/convert/notification.go b/modules/convert/notification.go index 49abe0125..cc941678b 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{