mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 16:40:24 +08:00 
			
		
		
		
	[API] pull notification subject status: add "merged" (#15344)
Current subject status can be "", "open" and "closed". This add "merged" to it.
This commit is contained in:
		@@ -47,6 +47,11 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
 | 
				
			|||||||
			if err == nil && comment != nil {
 | 
								if err == nil && comment != nil {
 | 
				
			||||||
				result.Subject.LatestCommentURL = comment.APIURL()
 | 
									result.Subject.LatestCommentURL = comment.APIURL()
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								pr, _ := n.Issue.GetPullRequest()
 | 
				
			||||||
 | 
								if pr != nil && pr.HasMerged {
 | 
				
			||||||
 | 
									result.Subject.State = "merged"
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	case models.NotificationSourceCommit:
 | 
						case models.NotificationSourceCommit:
 | 
				
			||||||
		result.Subject = &api.NotificationSubject{
 | 
							result.Subject = &api.NotificationSubject{
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user