File tree 3 files changed +10
-4
lines changed
3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -354,6 +354,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
354
354
if n .Issue != nil {
355
355
result .Subject .Title = n .Issue .Title
356
356
result .Subject .URL = n .Issue .APIURL ()
357
+ result .Subject .State = n .Issue .State ()
357
358
comment , err := n .Issue .GetLastComment ()
358
359
if err == nil && comment != nil {
359
360
result .Subject .LatestCommentURL = comment .APIURL ()
@@ -364,6 +365,7 @@ func (n *Notification) APIFormat() *api.NotificationThread {
364
365
if n .Issue != nil {
365
366
result .Subject .Title = n .Issue .Title
366
367
result .Subject .URL = n .Issue .APIURL ()
368
+ result .Subject .State = n .Issue .State ()
367
369
comment , err := n .Issue .GetLastComment ()
368
370
if err == nil && comment != nil {
369
371
result .Subject .LatestCommentURL = comment .APIURL ()
Original file line number Diff line number Diff line change @@ -21,10 +21,11 @@ type NotificationThread struct {
21
21
22
22
// NotificationSubject contains the notification subject (Issue/Pull/Commit)
23
23
type NotificationSubject struct {
24
- Title string `json:"title"`
25
- URL string `json:"url"`
26
- LatestCommentURL string `json:"latest_comment_url"`
27
- Type string `json:"type" binding:"In(Issue,Pull,Commit)"`
24
+ Title string `json:"title"`
25
+ URL string `json:"url"`
26
+ LatestCommentURL string `json:"latest_comment_url"`
27
+ Type string `json:"type" binding:"In(Issue,Pull,Commit)"`
28
+ State StateType `json:"state"`
28
29
}
29
30
30
31
// NotificationCount number of unread notifications
Original file line number Diff line number Diff line change 13835
13835
"type": "string",
13836
13836
"x-go-name": "LatestCommentURL"
13837
13837
},
13838
+ "state": {
13839
+ "$ref": "#/definitions/StateType"
13840
+ },
13838
13841
"title": {
13839
13842
"type": "string",
13840
13843
"x-go-name": "Title"
You can’t perform that action at this time.
0 commit comments