#2246 add HTMLURL to webhook type

- Fill Milestone and Assignee field when available in webhook payload
This commit is contained in:
Unknwon
2016-08-16 10:19:09 -07:00
parent 8bf57be9ba
commit 6f9a95f830
16 changed files with 105 additions and 74 deletions

View File

@ -129,7 +129,7 @@ func SendCollaboratorMail(u, doer *User, repo *Repository) {
data := map[string]interface{}{
"Subject": subject,
"RepoName": repoName,
"Link": repo.FullLink(),
"Link": repo.HTMLURL(),
}
body, err := mailRender.HTMLString(string(MAIL_NOTIFY_COLLABORATOR), data)
if err != nil {
@ -153,8 +153,8 @@ func composeTplData(subject, body, link string) map[string]interface{} {
func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []string, info string) *mailer.Message {
subject := issue.MailSubject()
body := string(markdown.RenderSpecialLink([]byte(issue.Content), issue.Repo.FullLink(), issue.Repo.ComposeMetas()))
data := composeTplData(subject, body, issue.FullLink())
body := string(markdown.RenderSpecialLink([]byte(issue.Content), issue.Repo.HTMLURL(), issue.Repo.ComposeMetas()))
data := composeTplData(subject, body, issue.HTMLURL())
data["Doer"] = doer
content, err := mailRender.HTMLString(string(tplName), data)
if err != nil {