mirror of
1
Fork 0

Merge pull request 'mailer: Switch X-Mailer to "Forgejo"' (#3931) from algernon/forgejo:mailer-detox into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/3931
Reviewed-by: Otto <otto@codeberg.org>
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-05-28 17:51:04 +00:00
commit 8cca0d74dc
2 changed files with 2 additions and 1 deletions

View File

@ -403,7 +403,7 @@ func generateAdditionalHeaders(ctx *mailCommentContext, reason string, recipient
// https://datatracker.ietf.org/doc/html/rfc2369 // https://datatracker.ietf.org/doc/html/rfc2369
"List-Archive": fmt.Sprintf("<%s>", repo.HTMLURL()), "List-Archive": fmt.Sprintf("<%s>", repo.HTMLURL()),
"X-Mailer": "Gitea", "X-Mailer": "Forgejo",
"X-Gitea-Reason": reason, "X-Gitea-Reason": reason,
"X-Gitea-Sender": ctx.Doer.Name, "X-Gitea-Sender": ctx.Doer.Name,
"X-Gitea-Recipient": recipient.Name, "X-Gitea-Recipient": recipient.Name,

View File

@ -360,6 +360,7 @@ func TestGenerateAdditionalHeaders(t *testing.T) {
expected := map[string]string{ expected := map[string]string{
"List-ID": "user2/repo1 <repo1.user2.localhost>", "List-ID": "user2/repo1 <repo1.user2.localhost>",
"List-Archive": "<https://try.gitea.io/user2/repo1>", "List-Archive": "<https://try.gitea.io/user2/repo1>",
"X-Mailer": "Forgejo",
"X-Gitea-Reason": "dummy-reason", "X-Gitea-Reason": "dummy-reason",
"X-Gitea-Sender": "user2", "X-Gitea-Sender": "user2",
"X-Gitea-Recipient": "test", "X-Gitea-Recipient": "test",