@@ -31,21 +31,25 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
31
31
if n .Issue != nil {
32
32
result .Subject .Title = n .Issue .Title
33
33
result .Subject .URL = n .Issue .APIURL ()
34
+ result .Subject .HTMLURL = n .Issue .HTMLURL ()
34
35
result .Subject .State = n .Issue .State ()
35
36
comment , err := n .Issue .GetLastComment ()
36
37
if err == nil && comment != nil {
37
38
result .Subject .LatestCommentURL = comment .APIURL ()
39
+ result .Subject .LatestCommentHTMLURL = comment .HTMLURL ()
38
40
}
39
41
}
40
42
case models .NotificationSourcePullRequest :
41
43
result .Subject = & api.NotificationSubject {Type : api .NotifySubjectPull }
42
44
if n .Issue != nil {
43
45
result .Subject .Title = n .Issue .Title
44
46
result .Subject .URL = n .Issue .APIURL ()
47
+ result .Subject .HTMLURL = n .Issue .HTMLURL ()
45
48
result .Subject .State = n .Issue .State ()
46
49
comment , err := n .Issue .GetLastComment ()
47
50
if err == nil && comment != nil {
48
51
result .Subject .LatestCommentURL = comment .APIURL ()
52
+ result .Subject .LatestCommentHTMLURL = comment .HTMLURL ()
49
53
}
50
54
51
55
pr , _ := n .Issue .GetPullRequest ()
@@ -54,16 +58,20 @@ func ToNotificationThread(n *models.Notification) *api.NotificationThread {
54
58
}
55
59
}
56
60
case models .NotificationSourceCommit :
61
+ url := n .Repository .HTMLURL () + "/commit/" + n .CommitID
57
62
result .Subject = & api.NotificationSubject {
58
- Type : api .NotifySubjectCommit ,
59
- Title : n .CommitID ,
60
- URL : n .Repository .HTMLURL () + "/commit/" + n .CommitID ,
63
+ Type : api .NotifySubjectCommit ,
64
+ Title : n .CommitID ,
65
+ URL : url ,
66
+ HTMLURL : url ,
61
67
}
62
68
case models .NotificationSourceRepository :
63
69
result .Subject = & api.NotificationSubject {
64
70
Type : api .NotifySubjectRepository ,
65
71
Title : n .Repository .FullName (),
66
- URL : n .Repository .Link (),
72
+ // FIXME: this is a relative URL, rather useless and inconsistent, but keeping for backwards compat
73
+ URL : n .Repository .Link (),
74
+ HTMLURL : n .Repository .HTMLURL (),
67
75
}
68
76
}
69
77
0 commit comments