Browse Source

[API] pull notification subject status: add "merged" (#15344) (#15654)

Current subject status can be "", "open" and "closed". This add "merged" to it.
mj-v1.14.3
6543 1 year ago
committed by GitHub
parent
commit
3bde297121
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/convert/notification.go

5
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{

Loading…
Cancel
Save