mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-26 01:40:36 +00:00
Add issue hyperlinks in the webhook of wechatwork (#18102)
Co-authored-by: zjj <2031381130@qq.com>
This commit is contained in:
parent
31a2bf29ed
commit
e34632bb53
1 changed files with 2 additions and 2 deletions
|
@ -117,7 +117,7 @@ func (f *WechatworkPayload) Push(p *api.PushPayload) (api.Payloader, error) {
|
||||||
func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) {
|
func (f *WechatworkPayload) Issue(p *api.IssuePayload) (api.Payloader, error) {
|
||||||
text, issueTitle, attachmentText, _ := getIssuesPayloadInfo(p, noneLinkFormatter, true)
|
text, issueTitle, attachmentText, _ := getIssuesPayloadInfo(p, noneLinkFormatter, true)
|
||||||
var content string
|
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
|
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) {
|
func (f *WechatworkPayload) IssueComment(p *api.IssueCommentPayload) (api.Payloader, error) {
|
||||||
text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true)
|
text, issueTitle, _ := getIssueCommentPayloadInfo(p, noneLinkFormatter, true)
|
||||||
var content string
|
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
|
return newWechatworkMarkdownPayload(content), nil
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue