summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorzjjhot <79889452+zjjhot@users.noreply.github.com>2021-12-25 21:30:09 +0800
committerGitHub <noreply@github.com>2021-12-25 21:30:09 +0800
commite34632bb53bb5c0076b3d517c4c739ddb23a4a5c (patch)
tree887d26dfcf34a29a291f7d002ee6d166bf4b26c7 /services
parent31a2bf29eda2f9bdba7ba51c1ee9f9a444a7996e (diff)
downloadgitea-e34632bb53bb5c0076b3d517c4c739ddb23a4a5c.tar.gz
gitea-e34632bb53bb5c0076b3d517c4c739ddb23a4a5c.zip
Add issue hyperlinks in the webhook of wechatwork (#18102)
Co-authored-by: zjj <2031381130@qq.com>
Diffstat (limited to 'services')
-rw-r--r--services/webhook/wechatwork.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/webhook/wechatwork.go b/services/webhook/wechatwork.go
index d28e70aded..e8ab07aaa0 100644
--- a/services/webhook/wechatwork.go
+++ b/services/webhook/wechatwork.go
@@ -117,7 +117,7 @@ func (f *WechatworkPayload) Push(p *api.PushPayload) (api.Payloader, error) {
func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) {
text, issueTitle, attachmentText, _ := getIssuesPayloadInfo(p, noneLinkFormatter, true)
var content string
- content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\"> %s</font>", text, attachmentText, issueTitle)
+ content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\"> %s</font> \n [%s](%s)", text, attachmentText, issueTitle, p.Issue.HTMLURL, p.Issue.HTMLURL)
return newWechatworkMarkdownPayload(content), nil
@@ -127,7 +127,7 @@ func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) {
func (f *WechatworkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) {
text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true)
var content string
- content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\">%s</font>", text, p.Comment.Body, issueTitle)
+ content += fmt.Sprintf(" ><font color=\"info\">%s</font>\n >%s \n ><font color=\"warning\">%s</font> \n [%s](%s)", text, p.Comment.Body, issueTitle, p.Comment.HTMLURL, p.Comment.HTMLURL)
return newWechatworkMarkdownPayload(content), nil