summaryrefslogtreecommitdiffstats
path: root/resources
diff options
context:
space:
mode:
authorMaxime Guerreiro <maximeg@google.com>2018-03-21 18:59:27 +0100
committerMaxime Guerreiro <maximeg@google.com>2018-03-22 16:30:08 +0100
commit8d129d41f5764faf1b2864652113b5e5acd8fb4a (patch)
treeda1dbc0683300575f13039572154fe1ca59800cc /resources
parent44cb0fd77a07cf96b03b44362e6eb4c66a00625e (diff)
Add Gerrit's instance name and reference it in notification emails
Gerrit users active on several Gerrit servers may find it hard to determine the gerrit instance related to an email. This commit fixes it by adding a Gerrit instance name to the email titles, right before the project's short name. For instance, for a Gerrit instance called "Pear" and the project "website/forum", the notification email titles will contain "Pear/forum". Also add configuration to disable this behavior. Change-Id: I6c842f33ce605125ec64ca7d09643f59aa96a02d
Diffstat (limited to 'resources')
-rw-r--r--resources/com/google/gerrit/server/mail/ChangeSubject.soy8
1 files changed, 7 insertions, 1 deletions
diff --git a/resources/com/google/gerrit/server/mail/ChangeSubject.soy b/resources/com/google/gerrit/server/mail/ChangeSubject.soy
index d8cffc4129..62092ae0ff 100644
--- a/resources/com/google/gerrit/server/mail/ChangeSubject.soy
+++ b/resources/com/google/gerrit/server/mail/ChangeSubject.soy
@@ -22,7 +22,13 @@
* @param branch
* @param change
* @param shortProjectName
+ * @param instanceAndProjectName
+ * @param addInstanceNameInSubject boolean
*/
{template .ChangeSubject kind="text"}
- Change in {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
+ {if $addInstanceNameInSubject}
+ Change in {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
+ {else}
+ Change in {$instanceAndProjectName}[{$branch.shortName}]: {$change.shortSubject}
+ {/if}
{/template}