From be68d899017ff0d79aa7bc9167381dba131342e0 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Sun, 27 Jul 2025 17:44:09 -0700 Subject: [PATCH] fix(ops/gerrit): send mail with the triggering user's name on it We found this bug in Lix's config and noticed Snix had the same bug; see https://git.lix.systems/the-distro/infra/commit/4b9e84fa0a7390b05bfaf82739173875dfe16b66 and https://git.lix.systems/the-distro/infra/commit/b47965fe8f472e146d21995db1e852a22f5fa673. Change-Id: I65b14839a62c4e779136c1c34750d15cedaaddc8 Reviewed-on: https://cl.snix.dev/c/snix/+/30605 Tested-by: besadii Reviewed-by: Florian Klink --- ops/modules/monorepo-gerrit.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ops/modules/monorepo-gerrit.nix b/ops/modules/monorepo-gerrit.nix index 564cd4158..6a2fd27e4 100644 --- a/ops/modules/monorepo-gerrit.nix +++ b/ops/modules/monorepo-gerrit.nix @@ -148,6 +148,12 @@ in # password against the backing OAuth provider. auth.gitBasicAuthPolicy = "HTTP"; + # Used for system-authored commits + user = { + name = "Snix Gerrit"; + email = "gerrit@snix.dev"; + }; + # Email sending # # Note that sendemail.smtpPass is stored in @@ -158,7 +164,10 @@ in enable = true; html = true; # multi-part, both html and plaintext connectTimeout = "10sec"; - from = "Snix Code Review "; + # Include the name of the user triggering the mailing. + # See: + # https://gerrit-review.googlesource.com/Documentation/config-gerrit.html#user.email + from = "\${user} (Snix Gerrit) "; includeDiff = true; smtpEncryption = "tls"; smtpServer = "smtp.postmarkapp.com";