Skip to content

Commit

Permalink
[API] pull notification subject status: add "merged" (go-gitea#15344) (
Browse files Browse the repository at this point in the history
…go-gitea#15654)

Current subject status can be "", "open" and "closed". This add "merged" to it.
  • Loading branch information
6543 authored Apr 28, 2021
1 parent 0dfde36 commit 3bde297
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/convert/notification.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down

0 comments on commit 3bde297

Please sign in to comment.