diff options
author | zeripath <art27@cantab.net> | 2021-09-30 00:20:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-30 01:20:18 +0200 |
commit | ddd3586c06d81d8732dd96498b63de029f30349e (patch) | |
tree | 10d29163b0e996f8535c3ac929794d7c670de6b9 /services | |
parent | ecfac78f6ef2cc01e4397c1a92b9a59b7ff0b2ff (diff) | |
download | gitea-ddd3586c06d81d8732dd96498b63de029f30349e.tar.gz gitea-ddd3586c06d81d8732dd96498b63de029f30349e.zip |
Fix missing repo link in issue/pull assigned emails (#17183)
There was a mistake in the template file: `templates/mail/issue/assigned.tmpl`
where the repourl was generated from a non-existent release instead of the issue.
This PR changes this to use the issue but also ensure that the issue repo is loaded.
It also slightly improves the English locale string.
Fix #17160
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: delvh <dev.lh@web.de>
Diffstat (limited to 'services')
-rw-r--r-- | services/mailer/mail.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/services/mailer/mail.go b/services/mailer/mail.go index 979f8aa227..721f6eb49b 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -372,6 +372,12 @@ func SendIssueAssignedMail(issue *models.Issue, doer *models.User, content strin // No mail service configured return nil } + + if err := issue.LoadRepo(); err != nil { + log.Error("Unable to load repo [%d] for issue #%d [%d]. Error: %v", issue.RepoID, issue.Index, issue.ID, err) + return err + } + langMap := make(map[string][]*models.User) for _, user := range recipients { langMap[user.Language] = append(langMap[user.Language], user) |