You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR closes#15065.
As advised by @mtojek, a template's display name may be set to "", which
is not useful in an email notification. We'd like to provide a friendly
name for the template, but it also needs to be identifiable.
As such, we fall back to template.Name in the case that the template's
display name is empty.
E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\n\n'||
5
+
-- Mention template display name:
6
+
E'The template''s display name was **{{.Labels.template_display_name}}**. '||
7
+
E'The workspace build was initiated by **{{.Labels.initiator}}**.'
8
+
WHERE
9
+
id ='2faeee0f-26cb-4e96-821c-85ccb9f71513';
10
+
11
+
UPDATE notification_templates
12
+
SET
13
+
body_template = E'Hi {{.UserName}},\n\n'||-- Add a comma
14
+
E'The template **{{.Labels.name}}** was deleted by **{{ .Labels.initiator }}**.\n\n'||
15
+
-- Mention template display name:
16
+
E'The template''s display name was **{{.Labels.display_name}}**.'
-- Revert to a single label for the template name:
5
+
E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\n\n'||
6
+
E'The workspace build was initiated by **{{.Labels.initiator}}**.'
7
+
WHERE
8
+
id ='2faeee0f-26cb-4e96-821c-85ccb9f71513';
9
+
10
+
UPDATE notification_templates
11
+
SET
12
+
body_template = E'Hi {{.UserName}},\n\n'||
13
+
-- Revert to a single label for the template name:
14
+
E'The template **{{.Labels.name}}** was deleted by **{{ .Labels.initiator }}**.\n\n'
"body": "Hi Bobby,\n\nA manual build of the workspace bobby-workspace using the template bobby-template failed (version: bobby-template-version).\n\nThe template's display name was William's Template. The workspace build was initiated by joe.",
32
-
"body_markdown": "Hi Bobby,\n\nA manual build of the workspace **bobby-workspace** using the template **bobby-template** failed (version: **bobby-template-version**).\n\nThe template's display name was **William's Template**. The workspace build was initiated by **joe**."
30
+
"body": "Hi Bobby,\n\nA manual build of the workspace bobby-workspace using the template bobby-template failed (version: bobby-template-version).\n\nThe workspace build was initiated by joe.",
31
+
"body_markdown": "Hi Bobby,\n\nA manual build of the workspace **bobby-workspace** using the template **bobby-template** failed (version: **bobby-template-version**).\n\nThe workspace build was initiated by **joe**."
0 commit comments