Files
coder/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManualBuildFailed.json.golden
T
Sas Swart fac77f956e fix(coderd/notifications): simplify TemplateWorkspaceManualBuildFailed (#15067)
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.
2024-10-15 21:02:02 +02:00

32 lines
1.3 KiB
Plaintext

{
"_version": "1.1",
"msg_id": "00000000-0000-0000-0000-000000000000",
"payload": {
"_version": "1.1",
"notification_name": "Workspace Manual Build Failed",
"notification_template_id": "00000000-0000-0000-0000-000000000000",
"user_id": "00000000-0000-0000-0000-000000000000",
"user_email": "bobby@coder.com",
"user_name": "Bobby",
"user_username": "bobby",
"actions": [
{
"label": "View build",
"url": "http://test.com/@mrbobby/bobby-workspace/builds/3"
}
],
"labels": {
"initiator": "joe",
"name": "bobby-workspace",
"template_name": "bobby-template",
"template_version_name": "bobby-template-version",
"workspace_build_number": "3",
"workspace_owner_username": "mrbobby"
},
"data": null
},
"title": "Workspace \"bobby-workspace\" manual build failed",
"title_markdown": "Workspace \"bobby-workspace\" manual build failed",
"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.",
"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**."
}