From d98a19930dea8010dc90654923012ba832626d40 Mon Sep 17 00:00:00 2001 From: defelmnq Date: Tue, 18 Mar 2025 23:25:18 +0000 Subject: [PATCH 01/21] work on removing greetings from templates --- ...greetings_notifications_templates.down.sql | 44 +++++++++++++++++++ ...e_greetings_notifications_templates.up.sql | 36 +++++++++++++++ .../notifications/dispatch/smtp/html.gotmpl | 1 + 3 files changed, 81 insertions(+) create mode 100644 coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql create mode 100644 coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql diff --git a/coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql b/coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql new file mode 100644 index 0000000000000..9f0b44ae9d81f --- /dev/null +++ b/coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql @@ -0,0 +1,44 @@ +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nYour workspace **{{.Labels.name}}** was deleted.\nThe specified reason was "**{{.Labels.reason}}{{ if .Labels.initiator }} ({{ .Labels.initiator }}){{end}}**".' WHERE id = 'f517da0b-cdc9-410f-ab89-a86107c420ed'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nAutomatic build of your workspace **{{.Labels.name}}** failed.\nThe specified reason was "**{{.Labels.reason}}**".' WHERE id = '381df2a9-c0c0-4749-420f-80a9280c66f9'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nYour workspace **{{.Labels.name}}** has been updated automatically to the latest template version ({{.Labels.template_version_name}}).' WHERE id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nNew user account **{{.Labels.created_account_name}}** has been created.' WHERE id = '4e19c0ac-94e1-4532-9515-d1801aa283b2'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nUser account **{{.Labels.deleted_account_name}}** has been deleted.' WHERE id = 'f44d9314-ad03-4bc8-95d0-5cad491da6b6'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nUser account **{{.Labels.suspended_account_name}}** has been suspended.' WHERE id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nYour account **{{.Labels.suspended_account_name}}** has been suspended.' WHERE id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nUser account **{{.Labels.activated_account_name}}** has been activated.' WHERE id = '9f5af851-8408-4e73-a7a1-c6502ba46689'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\nYour account **{{.Labels.activated_account_name}}** has been activated.' WHERE id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\n\nA manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\nThe workspace build was initiated by **{{.Labels.initiator}}**.' WHERE id = '2faeee0f-26cb-4e96-821c-85ccb9f71513'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}}, + +Template **{{.Labels.template_display_name}}** has failed to build {{.Data.failed_builds}}/{{.Data.total_builds}} times over the last {{.Data.report_frequency}}. + +**Report:** +{{range $version := .Data.template_versions}} +**{{$version.template_version_name}}** failed {{$version.failed_count}} time{{if gt $version.failed_count 1}}s{{end}}: +{{range $build := $version.failed_builds}} +* [{{$build.workspace_owner_username}} / {{$build.workspace_name}} / #{{$build.build_number}}]({{base_url}}/@{{$build.workspace_owner_username}}/{{$build.workspace_name}}/builds/{{$build.build_number}}) +{{- end}} +{{end}} +We recommend reviewing these issues to ensure future builds are successful.' WHERE id = '34a20db2-e9cc-4a93-b0e4-8569699d7a00'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\n\nA request to reset the password for your Coder account has been made. Your one-time passcode is:\n\n**{{.Labels.one_time_passcode}}**\n\nIf you did not request to reset your password, you can ignore this message.' WHERE id = '62f86a30-2330-4b61-a26d-311ff3b608cf'; +UPDATE notification_templates SET body_template = E'Hello {{.UserName}},\n\n'|| + E'The template **{{.Labels.template}}** has been deprecated with the following message:\n\n' || + E'**{{.Labels.message}}**\n\n' || + E'New workspaces may not be created from this template. Existing workspaces will continue to function normally.' WHERE id = 'f40fae84-55a2-42cd-99fa-b41c1ca64894'; +UPDATE notification_templates SET body_template = E'Hello {{.UserName}},\n\n'|| + E'The workspace **{{.Labels.workspace}}** has been created from the template **{{.Labels.template}}** using version **{{.Labels.version}}**.' WHERE id = '281fdf73-c6d6-4cbb-8ff5-888baf8a2fff'; +UPDATE notification_templates SET body_template = E'Hello {{.UserName}},\n\n'|| + E'A new workspace build has been manually created for your workspace **{{.Labels.workspace}}** by **{{.Labels.initiator}}** to update it to version **{{.Labels.version}}** of template **{{.Labels.template}}**.' WHERE id = 'd089fe7b-d5c5-4c0c-aaf5-689859f7d392'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\n\n'|| + E'Your workspace **{{.Labels.workspace}}** has reached the memory usage threshold set at **{{.Labels.threshold}}**.' WHERE id = 'a9d027b4-ac49-4fb1-9f6d-45af15f64e7a'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\n\n'|| + E'{{ if eq (len .Data.volumes) 1 }}{{ $volume := index .Data.volumes 0 }}'|| + E'Volume **`{{$volume.path}}`** is over {{$volume.threshold}} full in workspace **{{.Labels.workspace}}**.'|| + E'{{ else }}'|| + E'The following volumes are nearly full in workspace **{{.Labels.workspace}}**\n\n'|| + E'{{ range $volume := .Data.volumes }}'|| + E'- **`{{$volume.path}}`** is over {{$volume.threshold}} full\n'|| + E'{{ end }}'|| + E'{{ end }}' WHERE id = 'f047f6a3-5713-40f7-85aa-0394cce9fa3a'; +UPDATE notification_templates SET body_template = E'Hi {{.UserName}},\n\n'|| + E'This is a test notification.' WHERE id = 'c425f63e-716a-4bf4-ae24-78348f706c3f'; diff --git a/coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql b/coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql new file mode 100644 index 0000000000000..1434cf14f3c4d --- /dev/null +++ b/coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql @@ -0,0 +1,36 @@ +UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** was deleted.\nThe specified reason was "**{{.Labels.reason}}{{ if .Labels.initiator }} ({{ .Labels.initiator }}){{end}}**".' WHERE id = 'f517da0b-cdc9-410f-ab89-a86107c420ed'; +UPDATE notification_templates SET body_template = E'Automatic build of your workspace **{{.Labels.name}}** failed.\nThe specified reason was "**{{.Labels.reason}}**".' WHERE id = '381df2a9-c0c0-4749-420f-80a9280c66f9'; +UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** has been updated automatically to the latest template version ({{.Labels.template_version_name}}).' WHERE id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b'; +UPDATE notification_templates SET body_template = E'New user account **{{.Labels.created_account_name}}** has been created.' WHERE id = '4e19c0ac-94e1-4532-9515-d1801aa283b2'; +UPDATE notification_templates SET body_template = E'User account **{{.Labels.deleted_account_name}}** has been deleted.' WHERE id = 'f44d9314-ad03-4bc8-95d0-5cad491da6b6'; +UPDATE notification_templates SET body_template = E'User account **{{.Labels.suspended_account_name}}** has been suspended.' WHERE id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d'; +UPDATE notification_templates SET body_template = E'Your account **{{.Labels.suspended_account_name}}** has been suspended.' WHERE id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff'; +UPDATE notification_templates SET body_template = E'User account **{{.Labels.activated_account_name}}** has been activated.' WHERE id = '9f5af851-8408-4e73-a7a1-c6502ba46689'; +UPDATE notification_templates SET body_template = E'Your account **{{.Labels.activated_account_name}}** has been activated.' WHERE id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4'; +UPDATE notification_templates SET body_template = E'A manual build of the workspace **{{.Labels.name}}** using the template **{{.Labels.template_name}}** failed (version: **{{.Labels.template_version_name}}**).\nThe workspace build was initiated by **{{.Labels.initiator}}**.' WHERE id = '2faeee0f-26cb-4e96-821c-85ccb9f71513'; +UPDATE notification_templates SET body_template = E'Template **{{.Labels.template_display_name}}** has failed to build {{.Data.failed_builds}}/{{.Data.total_builds}} times over the last {{.Data.report_frequency}}. + +**Report:** +{{range $version := .Data.template_versions}} +**{{$version.template_version_name}}** failed {{$version.failed_count}} time{{if gt $version.failed_count 1}}s{{end}}: +{{range $build := $version.failed_builds}} +* [{{$build.workspace_owner_username}} / {{$build.workspace_name}} / #{{$build.build_number}}]({{base_url}}/@{{$build.workspace_owner_username}}/{{$build.workspace_name}}/builds/{{$build.build_number}}) +{{- end}} +{{end}} +We recommend reviewing these issues to ensure future builds are successful.' WHERE id = '34a20db2-e9cc-4a93-b0e4-8569699d7a00'; +UPDATE notification_templates SET body_template = E'A request to reset the password for your Coder account has been made. Your one-time passcode is:\n\n**{{.Labels.one_time_passcode}}**\n\nIf you did not request to reset your password, you can ignore this message.' WHERE id = '62f86a30-2330-4b61-a26d-311ff3b608cf'; +UPDATE notification_templates SET body_template = E'The template **{{.Labels.template}}** has been deprecated with the following message:\n\n' || + E'**{{.Labels.message}}**\n\n' || + E'New workspaces may not be created from this template. Existing workspaces will continue to function normally.' WHERE id = 'f40fae84-55a2-42cd-99fa-b41c1ca64894'; +UPDATE notification_templates SET body_template = E'The workspace **{{.Labels.workspace}}** has been created from the template **{{.Labels.template}}** using version **{{.Labels.version}}**.' WHERE id = '281fdf73-c6d6-4cbb-8ff5-888baf8a2fff'; +UPDATE notification_templates SET body_template = E'A new workspace build has been manually created for your workspace **{{.Labels.workspace}}** by **{{.Labels.initiator}}** to update it to version **{{.Labels.version}}** of template **{{.Labels.template}}**.' WHERE id = 'd089fe7b-d5c5-4c0c-aaf5-689859f7d392'; +UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.workspace}}** has reached the memory usage threshold set at **{{.Labels.threshold}}**.' WHERE id = 'a9d027b4-ac49-4fb1-9f6d-45af15f64e7a'; +UPDATE notification_templates SET body_template = E'{{ if eq (len .Data.volumes) 1 }}{{ $volume := index .Data.volumes 0 }}'|| + E'Volume **`{{$volume.path}}`** is over {{$volume.threshold}} full in workspace **{{.Labels.workspace}}**.'|| + E'{{ else }}'|| + E'The following volumes are nearly full in workspace **{{.Labels.workspace}}**\n\n'|| + E'{{ range $volume := .Data.volumes }}'|| + E'- **`{{$volume.path}}`** is over {{$volume.threshold}} full\n'|| + E'{{ end }}'|| + E'{{ end }}' WHERE id = 'f047f6a3-5713-40f7-85aa-0394cce9fa3a'; +UPDATE notification_templates SET body_template = E'This is a test notification.' WHERE id = 'c425f63e-716a-4bf4-ae24-78348f706c3f'; diff --git a/coderd/notifications/dispatch/smtp/html.gotmpl b/coderd/notifications/dispatch/smtp/html.gotmpl index 23a549288fa15..b780c8a7f2313 100644 --- a/coderd/notifications/dispatch/smtp/html.gotmpl +++ b/coderd/notifications/dispatch/smtp/html.gotmpl @@ -14,6 +14,7 @@ {{ .Labels._subject }}
+ Hi {{ UserUsername }}, {{ .Labels._body }}
From e4966e246a5204f2813be83971b09e281a7a62ed Mon Sep 17 00:00:00 2001 From: defelmnq Date: Tue, 18 Mar 2025 23:34:23 +0000 Subject: [PATCH 02/21] regenerate golden files --- ... 000302_remove_greetings_notifications_templates.down.sql} | 0 ...=> 000302_remove_greetings_notifications_templates.up.sql} | 0 .../webhook/TemplateTemplateDeprecated.json.golden | 4 ++-- .../webhook/TemplateTestNotification.json.golden | 4 ++-- .../webhook/TemplateUserAccountActivated.json.golden | 4 ++-- .../webhook/TemplateUserAccountCreated.json.golden | 4 ++-- .../webhook/TemplateUserAccountDeleted.json.golden | 4 ++-- .../webhook/TemplateUserAccountSuspended.json.golden | 4 ++-- .../webhook/TemplateUserRequestedOneTimePasscode.json.golden | 4 ++-- .../webhook/TemplateWorkspaceAutoUpdated.json.golden | 4 ++-- .../webhook/TemplateWorkspaceAutobuildFailed.json.golden | 4 ++-- .../webhook/TemplateWorkspaceCreated.json.golden | 4 ++-- .../webhook/TemplateWorkspaceDeleted.json.golden | 4 ++-- .../TemplateWorkspaceDeleted_CustomAppearance.json.golden | 4 ++-- .../webhook/TemplateWorkspaceManualBuildFailed.json.golden | 4 ++-- .../webhook/TemplateWorkspaceManuallyUpdated.json.golden | 4 ++-- .../webhook/TemplateWorkspaceOutOfDisk.json.golden | 4 ++-- .../TemplateWorkspaceOutOfDisk_MultipleVolumes.json.golden | 4 ++-- .../webhook/TemplateWorkspaceOutOfMemory.json.golden | 4 ++-- .../webhook/TemplateYourAccountActivated.json.golden | 4 ++-- .../webhook/TemplateYourAccountSuspended.json.golden | 4 ++-- 21 files changed, 38 insertions(+), 38 deletions(-) rename coderd/database/migrations/{000301_remove_greetings_notifications_templates.down.sql => 000302_remove_greetings_notifications_templates.down.sql} (100%) rename coderd/database/migrations/{000301_remove_greetings_notifications_templates.up.sql => 000302_remove_greetings_notifications_templates.up.sql} (100%) diff --git a/coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql b/coderd/database/migrations/000302_remove_greetings_notifications_templates.down.sql similarity index 100% rename from coderd/database/migrations/000301_remove_greetings_notifications_templates.down.sql rename to coderd/database/migrations/000302_remove_greetings_notifications_templates.down.sql diff --git a/coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql b/coderd/database/migrations/000302_remove_greetings_notifications_templates.up.sql similarity index 100% rename from coderd/database/migrations/000301_remove_greetings_notifications_templates.up.sql rename to coderd/database/migrations/000302_remove_greetings_notifications_templates.up.sql diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateTemplateDeprecated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateTemplateDeprecated.json.golden index 053cec2c56370..7fc5b85d8462e 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateTemplateDeprecated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateTemplateDeprecated.json.golden @@ -29,6 +29,6 @@ }, "title": "Template 'alpha' has been deprecated", "title_markdown": "Template 'alpha' has been deprecated", - "body": "Hello Bobby,\n\nThe template alpha has been deprecated with the following message:\n\nThis template has been replaced by beta\n\nNew workspaces may not be created from this template. Existing workspaces will continue to function normally.", - "body_markdown": "Hello Bobby,\n\nThe template **alpha** has been deprecated with the following message:\n\n**This template has been replaced by beta**\n\nNew workspaces may not be created from this template. Existing workspaces will continue to function normally." + "body": "The template alpha has been deprecated with the following message:\n\nThis template has been replaced by beta\n\nNew workspaces may not be created from this template. Existing workspaces will continue to function normally.", + "body_markdown": "The template **alpha** has been deprecated with the following message:\n\n**This template has been replaced by beta**\n\nNew workspaces may not be created from this template. Existing workspaces will continue to function normally." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateTestNotification.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateTestNotification.json.golden index e2c5744adb64b..44ecfb0502998 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateTestNotification.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateTestNotification.json.golden @@ -21,6 +21,6 @@ }, "title": "A test notification", "title_markdown": "A test notification", - "body": "Hi Bobby,\n\nThis is a test notification.", - "body_markdown": "Hi Bobby,\n\nThis is a test notification." + "body": "This is a test notification.", + "body_markdown": "This is a test notification." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountActivated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountActivated.json.golden index fc777758ef17d..323d070005135 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountActivated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountActivated.json.golden @@ -25,6 +25,6 @@ }, "title": "User account \"bobby\" activated", "title_markdown": "User account \"bobby\" activated", - "body": "Hi Bobby,\n\nUser account bobby has been activated.\n\nThe account belongs to William Tables and it was activated by rob.", - "body_markdown": "Hi Bobby,\n\nUser account **bobby** has been activated.\n\nThe account belongs to **William Tables** and it was activated by **rob**." + "body": "User account bobby has been activated.", + "body_markdown": "User account **bobby** has been activated." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountCreated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountCreated.json.golden index 6408398b55a93..36884ec6c8805 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountCreated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountCreated.json.golden @@ -25,6 +25,6 @@ }, "title": "User account \"bobby\" created", "title_markdown": "User account \"bobby\" created", - "body": "Hi Bobby,\n\nNew user account bobby has been created.\n\nThis new user account was created for William Tables by rob.", - "body_markdown": "Hi Bobby,\n\nNew user account **bobby** has been created.\n\nThis new user account was created for **William Tables** by **rob**." + "body": "New user account bobby has been created.", + "body_markdown": "New user account **bobby** has been created." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountDeleted.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountDeleted.json.golden index 71260e8e8ba8e..825cfb8ba02f1 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountDeleted.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountDeleted.json.golden @@ -25,6 +25,6 @@ }, "title": "User account \"bobby\" deleted", "title_markdown": "User account \"bobby\" deleted", - "body": "Hi Bobby,\n\nUser account bobby has been deleted.\n\nThe deleted account belonged to William Tables and was deleted by rob.", - "body_markdown": "Hi Bobby,\n\nUser account **bobby** has been deleted.\n\nThe deleted account belonged to **William Tables** and was deleted by **rob**." + "body": "User account bobby has been deleted.", + "body_markdown": "User account **bobby** has been deleted." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountSuspended.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountSuspended.json.golden index 7d5afe2642f5b..043cfe871dbbf 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountSuspended.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserAccountSuspended.json.golden @@ -25,6 +25,6 @@ }, "title": "User account \"bobby\" suspended", "title_markdown": "User account \"bobby\" suspended", - "body": "Hi Bobby,\n\nUser account bobby has been suspended.\n\nThe account belongs to William Tables and it was suspended by rob.", - "body_markdown": "Hi Bobby,\n\nUser account **bobby** has been suspended.\n\nThe account belongs to **William Tables** and it was suspended by **rob**." + "body": "User account bobby has been suspended.", + "body_markdown": "User account **bobby** has been suspended." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserRequestedOneTimePasscode.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserRequestedOneTimePasscode.json.golden index 0d22706cd2d85..223849662556f 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserRequestedOneTimePasscode.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateUserRequestedOneTimePasscode.json.golden @@ -23,6 +23,6 @@ }, "title": "Reset your password for Coder", "title_markdown": "Reset your password for Coder", - "body": "Hi Bobby,\n\nUse the link below to reset your password.\n\nIf you did not make this request, you can ignore this message.", - "body_markdown": "Hi Bobby,\n\nUse the link below to reset your password.\n\nIf you did not make this request, you can ignore this message." + "body": "A request to reset the password for your Coder account has been made. Your one-time passcode is:\n\n00000000-0000-0000-0000-000000000000\n\nIf you did not request to reset your password, you can ignore this message.", + "body_markdown": "A request to reset the password for your Coder account has been made. Your one-time passcode is:\n\n**00000000-0000-0000-0000-000000000000**\n\nIf you did not request to reset your password, you can ignore this message." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutoUpdated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutoUpdated.json.golden index a6f566448efd8..b9db0c77276e8 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutoUpdated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutoUpdated.json.golden @@ -25,6 +25,6 @@ }, "title": "Workspace \"bobby-workspace\" updated automatically", "title_markdown": "Workspace \"bobby-workspace\" updated automatically", - "body": "Hi Bobby,\n\nYour workspace bobby-workspace has been updated automatically to the latest template version (1.0).\n\nReason for update: template now includes catnip.", - "body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** has been updated automatically to the latest template version (1.0).\n\nReason for update: **template now includes catnip**." + "body": "Your workspace bobby-workspace has been updated automatically to the latest template version (1.0).", + "body_markdown": "Your workspace **bobby-workspace** has been updated automatically to the latest template version (1.0)." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutobuildFailed.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutobuildFailed.json.golden index 2d4c8da409f4f..621bda8809aed 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutobuildFailed.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceAutobuildFailed.json.golden @@ -24,6 +24,6 @@ }, "title": "Workspace \"bobby-workspace\" autobuild failed", "title_markdown": "Workspace \"bobby-workspace\" autobuild failed", - "body": "Hi Bobby,\n\nAutomatic build of your workspace bobby-workspace failed.\n\nThe specified reason was \"autostart\".", - "body_markdown": "Hi Bobby,\n\nAutomatic build of your workspace **bobby-workspace** failed.\n\nThe specified reason was \"**autostart**\"." + "body": "Automatic build of your workspace bobby-workspace failed.\nThe specified reason was \"autostart\".", + "body_markdown": "Automatic build of your workspace **bobby-workspace** failed.\nThe specified reason was \"**autostart**\"." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceCreated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceCreated.json.golden index baa032fee5bae..4b1689d07c9e5 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceCreated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceCreated.json.golden @@ -25,6 +25,6 @@ }, "title": "Workspace 'bobby-workspace' has been created", "title_markdown": "Workspace 'bobby-workspace' has been created", - "body": "Hello Bobby,\n\nThe workspace bobby-workspace has been created from the template bobby-template using version alpha.", - "body_markdown": "Hello Bobby,\n\nThe workspace **bobby-workspace** has been created from the template **bobby-template** using version **alpha**." + "body": "The workspace bobby-workspace has been created from the template bobby-template using version alpha.", + "body_markdown": "The workspace **bobby-workspace** has been created from the template **bobby-template** using version **alpha**." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted.json.golden index 0ef7a16ae1789..26b2c8fdb1d58 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted.json.golden @@ -29,6 +29,6 @@ }, "title": "Workspace \"bobby-workspace\" deleted", "title_markdown": "Workspace \"bobby-workspace\" deleted", - "body": "Hi Bobby,\n\nYour workspace bobby-workspace was deleted.\n\nThe specified reason was \"autodeleted due to dormancy (autobuild)\".", - "body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** was deleted.\n\nThe specified reason was \"**autodeleted due to dormancy (autobuild)**\"." + "body": "Your workspace bobby-workspace was deleted.\nThe specified reason was \"autodeleted due to dormancy (autobuild)\".", + "body_markdown": "Your workspace **bobby-workspace** was deleted.\nThe specified reason was \"**autodeleted due to dormancy (autobuild)**\"." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted_CustomAppearance.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted_CustomAppearance.json.golden index 0ef7a16ae1789..26b2c8fdb1d58 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted_CustomAppearance.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDeleted_CustomAppearance.json.golden @@ -29,6 +29,6 @@ }, "title": "Workspace \"bobby-workspace\" deleted", "title_markdown": "Workspace \"bobby-workspace\" deleted", - "body": "Hi Bobby,\n\nYour workspace bobby-workspace was deleted.\n\nThe specified reason was \"autodeleted due to dormancy (autobuild)\".", - "body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** was deleted.\n\nThe specified reason was \"**autodeleted due to dormancy (autobuild)**\"." + "body": "Your workspace bobby-workspace was deleted.\nThe specified reason was \"autodeleted due to dormancy (autobuild)\".", + "body_markdown": "Your workspace **bobby-workspace** was deleted.\nThe specified reason was \"**autodeleted due to dormancy (autobuild)**\"." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManualBuildFailed.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManualBuildFailed.json.golden index e06fdb36a24d0..fc198d8cd3e1e 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManualBuildFailed.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManualBuildFailed.json.golden @@ -28,6 +28,6 @@ }, "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**." + "body": "A manual build of the workspace bobby-workspace using the template bobby-template failed (version: bobby-template-version).\nThe workspace build was initiated by joe.", + "body_markdown": "A manual build of the workspace **bobby-workspace** using the template **bobby-template** failed (version: **bobby-template-version**).\nThe workspace build was initiated by **joe**." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManuallyUpdated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManuallyUpdated.json.golden index af80db4cf73a0..0b3cb8aa13b61 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManuallyUpdated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceManuallyUpdated.json.golden @@ -31,6 +31,6 @@ }, "title": "Workspace 'bobby-workspace' has been manually updated", "title_markdown": "Workspace 'bobby-workspace' has been manually updated", - "body": "Hello Bobby,\n\nA new workspace build has been manually created for your workspace bobby-workspace by bobby to update it to version alpha of template bobby-template.", - "body_markdown": "Hello Bobby,\n\nA new workspace build has been manually created for your workspace **bobby-workspace** by **bobby** to update it to version **alpha** of template **bobby-template**." + "body": "A new workspace build has been manually created for your workspace bobby-workspace by bobby to update it to version alpha of template bobby-template.", + "body_markdown": "A new workspace build has been manually created for your workspace **bobby-workspace** by **bobby** to update it to version **alpha** of template **bobby-template**." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk.json.golden index a87d32d4b3fd1..8f415adadba7a 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk.json.golden @@ -30,6 +30,6 @@ }, "title": "Your workspace \"bobby-workspace\" is low on volume space", "title_markdown": "Your workspace \"bobby-workspace\" is low on volume space", - "body": "Hi Bobby,\n\nVolume /home/coder is over 90% full in workspace bobby-workspace.", - "body_markdown": "Hi Bobby,\n\nVolume **`/home/coder`** is over 90% full in workspace **bobby-workspace**." + "body": "Volume /home/coder is over 90% full in workspace bobby-workspace.", + "body_markdown": "Volume **`/home/coder`** is over 90% full in workspace **bobby-workspace**." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk_MultipleVolumes.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk_MultipleVolumes.json.golden index d2d666377bed8..1572c39e03da2 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk_MultipleVolumes.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfDisk_MultipleVolumes.json.golden @@ -38,6 +38,6 @@ }, "title": "Your workspace \"bobby-workspace\" is low on volume space", "title_markdown": "Your workspace \"bobby-workspace\" is low on volume space", - "body": "Hi Bobby,\n\nThe following volumes are nearly full in workspace bobby-workspace\n\n/home/coder is over 90% full\n/dev/coder is over 80% full\n/etc/coder is over 95% full", - "body_markdown": "Hi Bobby,\n\nThe following volumes are nearly full in workspace **bobby-workspace**\n\n- **`/home/coder`** is over 90% full\n- **`/dev/coder`** is over 80% full\n- **`/etc/coder`** is over 95% full\n" + "body": "The following volumes are nearly full in workspace bobby-workspace\n\n/home/coder is over 90% full\n/dev/coder is over 80% full\n/etc/coder is over 95% full", + "body_markdown": "The following volumes are nearly full in workspace **bobby-workspace**\n\n- **`/home/coder`** is over 90% full\n- **`/dev/coder`** is over 80% full\n- **`/etc/coder`** is over 95% full\n" } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfMemory.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfMemory.json.golden index 4787c5c256334..ccbcc1acccd27 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfMemory.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceOutOfMemory.json.golden @@ -24,6 +24,6 @@ }, "title": "Your workspace \"bobby-workspace\" is low on memory", "title_markdown": "Your workspace \"bobby-workspace\" is low on memory", - "body": "Hi Bobby,\n\nYour workspace bobby-workspace has reached the memory usage threshold set at 90%.", - "body_markdown": "Hi Bobby,\n\nYour workspace **bobby-workspace** has reached the memory usage threshold set at **90%**." + "body": "Your workspace bobby-workspace has reached the memory usage threshold set at 90%.", + "body_markdown": "Your workspace **bobby-workspace** has reached the memory usage threshold set at **90%**." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountActivated.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountActivated.json.golden index df0681c76e7cf..d5d6cff7dfa39 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountActivated.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountActivated.json.golden @@ -24,6 +24,6 @@ }, "title": "Your account \"bobby\" has been activated", "title_markdown": "Your account \"bobby\" has been activated", - "body": "Hi Bobby,\n\nYour account bobby has been activated by rob.", - "body_markdown": "Hi Bobby,\n\nYour account **bobby** has been activated by **rob**." + "body": "Your account bobby has been activated.", + "body_markdown": "Your account **bobby** has been activated." } \ No newline at end of file diff --git a/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountSuspended.json.golden b/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountSuspended.json.golden index 8bfeff26a387f..543c3b28ba5e8 100644 --- a/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountSuspended.json.golden +++ b/coderd/notifications/testdata/rendered-templates/webhook/TemplateYourAccountSuspended.json.golden @@ -19,6 +19,6 @@ }, "title": "Your account \"bobby\" has been suspended", "title_markdown": "Your account \"bobby\" has been suspended", - "body": "Hi Bobby,\n\nYour account bobby has been suspended by rob.", - "body_markdown": "Hi Bobby,\n\nYour account **bobby** has been suspended by **rob**." + "body": "Your account bobby has been suspended.", + "body_markdown": "Your account **bobby** has been suspended." } \ No newline at end of file From 359884a5ccacbfa93fde7c20c8af4a9b4714ed47 Mon Sep 17 00:00:00 2001 From: defelmnq Date: Tue, 18 Mar 2025 23:44:16 +0000 Subject: [PATCH 03/21] give it another try --- coderd/notifications/dispatch/smtp/html.gotmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coderd/notifications/dispatch/smtp/html.gotmpl b/coderd/notifications/dispatch/smtp/html.gotmpl index b780c8a7f2313..9276bfd38c9b7 100644 --- a/coderd/notifications/dispatch/smtp/html.gotmpl +++ b/coderd/notifications/dispatch/smtp/html.gotmpl @@ -14,7 +14,7 @@ {{ .Labels._subject }}
- Hi {{ UserUsername }}, + Hi {{ .UserUsername }}, {{ .Labels._body }}
From 9ce82de638e155e1c71810ae00caba7966709769 Mon Sep 17 00:00:00 2001 From: defelmnq Date: Tue, 18 Mar 2025 23:58:36 +0000 Subject: [PATCH 04/21] wokr on golden files --- coderd/notifications/dispatch/smtp/html.gotmpl | 2 +- .../smtp/TemplateTemplateDeleted.html.golden | 1 + .../smtp/TemplateTemplateDeprecated.html.golden | 9 +++------ .../smtp/TemplateTestNotification.html.golden | 7 ++----- .../TemplateUserAccountActivated.html.golden | 12 ++---------- .../smtp/TemplateUserAccountCreated.html.golden | 12 ++---------- .../smtp/TemplateUserAccountDeleted.html.golden | 12 ++---------- .../TemplateUserAccountSuspended.html.golden | 12 ++---------- ...plateUserRequestedOneTimePasscode.html.golden | 16 ++++++++++------ .../TemplateWorkspaceAutoUpdated.html.golden | 13 +++---------- .../TemplateWorkspaceAutobuildFailed.html.golden | 13 ++++--------- .../smtp/TemplateWorkspaceCreated.html.golden | 11 ++++------- .../smtp/TemplateWorkspaceDeleted.html.golden | 13 ++++--------- ...WorkspaceDeleted_CustomAppearance.html.golden | 13 ++++--------- .../smtp/TemplateWorkspaceDormant.html.golden | 1 + ...emplateWorkspaceManualBuildFailed.html.golden | 15 +++++---------- .../TemplateWorkspaceManuallyUpdated.html.golden | 12 +++++------- ...emplateWorkspaceMarkedForDeletion.html.golden | 1 + .../smtp/TemplateWorkspaceOutOfDisk.html.golden | 9 +++------ ...orkspaceOutOfDisk_MultipleVolumes.html.golden | 9 +++------ .../TemplateWorkspaceOutOfMemory.html.golden | 9 +++------ .../TemplateYourAccountActivated.html.golden | 10 +++------- .../TemplateYourAccountSuspended.html.golden | 10 +++------- 23 files changed, 71 insertions(+), 151 deletions(-) diff --git a/coderd/notifications/dispatch/smtp/html.gotmpl b/coderd/notifications/dispatch/smtp/html.gotmpl index 9276bfd38c9b7..94c193c3663da 100644 --- a/coderd/notifications/dispatch/smtp/html.gotmpl +++ b/coderd/notifications/dispatch/smtp/html.gotmpl @@ -14,7 +14,7 @@ {{ .Labels._subject }}
- Hi {{ .UserUsername }}, + Hi, {{ .Labels._body }}
diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateTemplateDeleted.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateTemplateDeleted.html.golden index 2ae9ac8e61db5..3d5c5997d6a2e 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateTemplateDeleted.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateTemplateDeleted.html.golden @@ -45,6 +45,7 @@ argin: 8px 0 32px; line-height: 1.5;"> Template "Bobby's Template" deleted
+ Hi,

Hi Bobby,

The template Bobby’s Template was deleted by Template 'alpha' has been deprecated

-

Hello Bobby,

- -

The template alpha has been deprecated with the followi= -ng message:

+ Hi, +

The template alpha has been deprecated with the= + following message:

This template has been replaced by beta

diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateTestNotification.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateTestNotification.html.golden index c7e5641c37fa5..41a041b8af9ab 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateTestNotification.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateTestNotification.html.golden @@ -10,8 +10,6 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - This is a test notification. @@ -46,9 +44,8 @@ argin: 8px 0 32px; line-height: 1.5;"> A test notification
-

Hi Bobby,

- -

This is a test notification.

+ Hi, +

This is a test notification.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountActivated.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountActivated.html.golden index 49b789382218e..ed15639d28be9 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountActivated.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountActivated.html.golden @@ -10,12 +10,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - User account bobby has been activated. -The account belongs to William Tables and it was activated by rob. - View accounts: http://test.com/deployment/users?filter=3Dstatus%3Aactive @@ -47,12 +43,8 @@ argin: 8px 0 32px; line-height: 1.5;"> User account "bobby" activated
-

Hi Bobby,

- -

User account bobby has been activated.

- -

The account belongs to William Tables and it was activa= -ted by rob.

+ Hi, +

User account bobby has been activated.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountCreated.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountCreated.html.golden index 9a6cab0989897..453f058c0e3e5 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountCreated.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountCreated.html.golden @@ -10,12 +10,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - New user account bobby has been created. -This new user account was created for William Tables by rob. - View accounts: http://test.com/deployment/users?filter=3Dstatus%3Aactive @@ -47,12 +43,8 @@ argin: 8px 0 32px; line-height: 1.5;"> User account "bobby" created
-

Hi Bobby,

- -

New user account bobby has been created.

- -

This new user account was created for William Tables by= - rob.

+ Hi, +

New user account bobby has been created.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountDeleted.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountDeleted.html.golden index c7daad54f028b..1fdfceff10a2a 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountDeleted.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountDeleted.html.golden @@ -10,12 +10,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - User account bobby has been deleted. -The deleted account belonged to William Tables and was deleted by rob. - View accounts: http://test.com/deployment/users?filter=3Dstatus%3Aactive @@ -47,12 +43,8 @@ argin: 8px 0 32px; line-height: 1.5;"> User account "bobby" deleted
-

Hi Bobby,

- -

User account bobby has been deleted.

- -

The deleted account belonged to William Tables and was = -deleted by rob.

+ Hi, +

User account bobby has been deleted.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountSuspended.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountSuspended.html.golden index b79445994d47e..004d2d39d6c47 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountSuspended.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserAccountSuspended.html.golden @@ -10,12 +10,8 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - User account bobby has been suspended. -The account belongs to William Tables and it was suspended by rob. - View suspended accounts: http://test.com/deployment/users?filter=3Dstatus%3= Asuspended @@ -48,12 +44,8 @@ argin: 8px 0 32px; line-height: 1.5;"> User account "bobby" suspended
-

Hi Bobby,

- -

User account bobby has been suspended.

- -

The account belongs to William Tables and it was suspen= -ded by rob.

+ Hi, +

User account bobby has been suspended.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserRequestedOneTimePasscode.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserRequestedOneTimePasscode.html.golden index 04f69ed741da2..a166d9997f0be 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserRequestedOneTimePasscode.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateUserRequestedOneTimePasscode.html.golden @@ -10,11 +10,12 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, +A request to reset the password for your Coder account has been made. Your = +one-time passcode is: -Use the link below to reset your password. +fad9020b-6562-4cdb-87f1-0486f1bea415 -If you did not make this request, you can ignore this message. +If you did not request to reset your password, you can ignore this message. Reset password: http://test.com/reset-password/change?otp=3Dfad9020b-6562-4= @@ -48,11 +49,14 @@ argin: 8px 0 32px; line-height: 1.5;"> Reset your password for Coder
-

Hi Bobby,

+ Hi, +

A request to reset the password for your Coder account has been = +made. Your one-time passcode is:

-

Use the link below to reset your password.

+

fad9020b-6562-4cdb-87f1-0486f1bea415

-

If you did not make this request, you can ignore this message.

+

If you did not request to reset your password, you can ignore this messa= +ge.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutoUpdated.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutoUpdated.html.golden index 6c68cffa8bc1b..e907f9c68a428 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutoUpdated.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutoUpdated.html.golden @@ -10,13 +10,9 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - Your workspace bobby-workspace has been updated automatically to the latest= template version (1.0). -Reason for update: template now includes catnip. - View workspace: http://test.com/@bobby/bobby-workspace @@ -48,12 +44,9 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" updated automatically
-

Hi Bobby,

- -

Your workspace bobby-workspace has been updated automat= -ically to the latest template version (1.0).

- -

Reason for update: template now includes catnip.

+ Hi, +

Your workspace bobby-workspace has been updated= + automatically to the latest template version (1.0).

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutobuildFailed.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutobuildFailed.html.golden index 340e794f15c74..307171e23af0b 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutobuildFailed.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceAutobuildFailed.html.golden @@ -10,10 +10,7 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - Automatic build of your workspace bobby-workspace failed. - The specified reason was "autostart". @@ -47,12 +44,10 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" autobuild failed
-

Hi Bobby,

- -

Automatic build of your workspace bobby-workspace faile= -d.

- -

The specified reason was “autostart”.

+ Hi, +

Automatic build of your workspace bobby-workspace failed.
+The specified reason was “autostart”.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceCreated.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceCreated.html.golden index 9d039ea7f77e9..e2a6dc7fb0fb3 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceCreated.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceCreated.html.golden @@ -10,8 +10,6 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hello Bobby, - The workspace bobby-workspace has been created from the template bobby-temp= late using version alpha. @@ -46,11 +44,10 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace 'bobby-workspace' has been created
-

Hello Bobby,

- -

The workspace bobby-workspace has been created from the= - template bobby-template using version alpha.

+ Hi, +

The workspace bobby-workspace has been created = +from the template bobby-template using version alp= +ha.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted.html.golden index 0d821bdc4dacd..cf2482f31a380 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted.html.golden @@ -10,10 +10,7 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - Your workspace bobby-workspace was deleted. - The specified reason was "autodeleted due to dormancy (autobuild)". @@ -49,12 +46,10 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" deleted
-

Hi Bobby,

- -

Your workspace bobby-workspace was deleted.

- -

The specified reason was “autodeleted due to dormancy (aut= -obuild)”.

+ Hi, +

Your workspace bobby-workspace was deleted.
+The specified reason was “autodeleted due to dormancy (autobu= +ild)”.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted_CustomAppearance.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted_CustomAppearance.html.golden index a6aa1f62d9ab9..f12ed7ce59cf2 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted_CustomAppearance.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDeleted_CustomAppearance.html.golden @@ -10,10 +10,7 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - Your workspace bobby-workspace was deleted. - The specified reason was "autodeleted due to dormancy (autobuild)". @@ -49,12 +46,10 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" deleted
-

Hi Bobby,

- -

Your workspace bobby-workspace was deleted.

- -

The specified reason was “autodeleted due to dormancy (aut= -obuild)”.

+ Hi, +

Your workspace bobby-workspace was deleted.
+The specified reason was “autodeleted due to dormancy (autobu= +ild)”.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden index 0c6cbf5a2dd85..f5120b616514e 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden @@ -51,6 +51,7 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" marked as dormant
+ Hi,

Hi Bobby,

Your workspace bobby-workspace has been marked as Workspace "bobby-workspace" manual build failed

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceManuallyUpdated.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceManuallyUpdated.html.golden index 57a9a0d51b7b7..3e775adcd9286 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceManuallyUpdated.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceManuallyUpdated.html.golden @@ -10,8 +10,6 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hello Bobby, - A new workspace build has been manually created for your workspace bobby-wo= rkspace by bobby to update it to version alpha of template bobby-template. @@ -49,11 +47,11 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace 'bobby-workspace' has been manually updated
-

Hello Bobby,

- -

A new workspace build has been manually created for your workspace bobby-workspace by bobby to update it to versi= -on alpha of template bobby-template.

+ Hi, +

A new workspace build has been manually created for your workspa= +ce bobby-workspace by bobby to update it = +to version alpha of template bobby-template.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceMarkedForDeletion.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceMarkedForDeletion.html.golden index 6d91458f2cbcc..c2495a6bedf40 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceMarkedForDeletion.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceMarkedForDeletion.html.golden @@ -48,6 +48,7 @@ argin: 8px 0 32px; line-height: 1.5;"> Workspace "bobby-workspace" marked for deletion
+ Hi,

Hi Bobby,

Your workspace bobby-workspace has been marked for Your workspace "bobby-workspace" is low on volume space

-

Hi Bobby,

- -

Volume /home/coder is over 90% full in wor= -kspace bobby-workspace.

+ Hi, +

Volume /home/coder is over 90% ful= +l in workspace bobby-workspace.

=20 diff --git a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceOutOfDisk_MultipleVolumes.html.golden b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceOutOfDisk_MultipleVolumes.html.golden index 87e5dec07cdaf..44678a684b916 100644 --- a/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceOutOfDisk_MultipleVolumes.html.golden +++ b/coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceOutOfDisk_MultipleVolumes.html.golden @@ -10,8 +10,6 @@ MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 -Hi Bobby, - The following volumes are nearly full in workspace bobby-workspace /home/coder is over 90% full @@ -49,10 +47,9 @@ argin: 8px 0 32px; line-height: 1.5;"> Your workspace "bobby-workspace" is low on volume space
-

Hi Bobby,

- -

The following volumes are nearly full in workspace bobby-workspa= -ce

+ Hi, +

The following volumes are nearly full in workspace bobby= +-workspace