Expose instanceName in the subject template

Add a variable `instanceName` to the variables offered in the subject
template.

Remove the instanceAndProjectName as it is easy to reconstruct it using
the projectName and instanceName variables. It was also incorrect, as
it relied on the short name and not on the project name.

It was introduced recently, so _I_ don't think any gerrit instance will
break.

Change-Id: Iaf46fcbc1df6db637cb95711bac84a4ead5fc036
This commit is contained in:
Maxime Guerreiro
2018-04-24 18:03:17 +00:00
parent e7cc57dc17
commit eb4d2d8da7
4 changed files with 6 additions and 31 deletions

View File

@@ -22,13 +22,13 @@
* @param branch
* @param change
* @param shortProjectName
* @param instanceAndProjectName
* @param instanceName
* @param addInstanceNameInSubject boolean
*/
{template .ChangeSubject kind="text"}
{if not $addInstanceNameInSubject}
Change in {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
{else}
Change in {$instanceAndProjectName}[{$branch.shortName}]: {$change.shortSubject}
[{$instanceName}] Change in {$shortProjectName}[{$branch.shortName}]: {$change.shortSubject}
{/if}
{/template}