Skip to content

Commit ddb0674

Browse files
authored
chore: improve dormant workspace notification wording (coder#17100)
Related to coder#17099
1 parent cac1303 commit ddb0674

File tree

4 files changed

+22
-14
lines changed

4 files changed

+22
-14
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of {{.Labels.reason}}.\n' ||
2+
E'Dormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after {{.Labels.timeTilDormant}} of inactivity.\n' ||
3+
E'To prevent deletion, use your workspace with the link below.' WHERE id = '0ea69165-ec14-4314-91f1-69566ac3c5a0';
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
UPDATE notification_templates SET body_template = E'Your workspace **{{.Labels.name}}** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity exceeding the dormancy threshold.\n\n' ||
2+
E'This workspace will be automatically deleted in {{.Labels.timeTilDormant}} if it remains inactive.\n\n' ||
3+
E'To prevent deletion, activate your workspace using the link below.' WHERE id = '0ea69165-ec14-4314-91f1-69566ac3c5a0';

coderd/notifications/testdata/rendered-templates/smtp/TemplateWorkspaceDormant.html.golden

+14-12
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ Content-Type: text/plain; charset=UTF-8
1313
Hi Bobby,
1414

1515
Your workspace bobby-workspace has been marked as dormant (https://coder.co=
16-
m/docs/templates/schedule#dormancy-threshold-enterprise) because of breache=
17-
d the template's threshold for inactivity.
18-
Dormant workspaces are automatically deleted (https://coder.com/docs/templa=
19-
tes/schedule#dormancy-auto-deletion-enterprise) after 24 hours of inactivit=
20-
y.
21-
To prevent deletion, use your workspace with the link below.
16+
m/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity =
17+
exceeding the dormancy threshold.
18+
19+
This workspace will be automatically deleted in 24 hours if it remains inac=
20+
tive.
21+
22+
To prevent deletion, activate your workspace using the link below.
2223

2324

2425
View workspace: http://test.com/@bobby/bobby-workspace
@@ -54,12 +55,13 @@ argin: 8px 0 32px; line-height: 1.5;">
5455
<p>Hi Bobby,</p>
5556
<p>Your workspace <strong>bobby-workspace</strong> has been marked =
5657
as <a href=3D"https://coder.com/docs/templates/schedule#dormancy-threshold-=
57-
enterprise"><strong>dormant</strong></a> because of breached the template&r=
58-
squo;s threshold for inactivity.<br>
59-
Dormant workspaces are <a href=3D"https://coder.com/docs/templates/schedule=
60-
#dormancy-auto-deletion-enterprise">automatically deleted</a> after 24 hour=
61-
s of inactivity.<br>
62-
To prevent deletion, use your workspace with the link below.</p>
58+
enterprise"><strong>dormant</strong></a> due to inactivity exceeding the do=
59+
rmancy threshold.</p>
60+
61+
<p>This workspace will be automatically deleted in 24 hours if it remains i=
62+
nactive.</p>
63+
64+
<p>To prevent deletion, activate your workspace using the link below.</p>
6365
</div>
6466
<div style=3D"text-align: center; margin-top: 32px;">
6567
=20

coderd/notifications/testdata/rendered-templates/webhook/TemplateWorkspaceDormant.json.golden

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@
2727
},
2828
"title": "Workspace \"bobby-workspace\" marked as dormant",
2929
"title_markdown": "Workspace \"bobby-workspace\" marked as dormant",
30-
"body": "Your workspace bobby-workspace has been marked as dormant (https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of breached the template's threshold for inactivity.\nDormant workspaces are automatically deleted (https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after 24 hours of inactivity.\nTo prevent deletion, use your workspace with the link below.",
31-
"body_markdown": "Your workspace **bobby-workspace** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) because of breached the template's threshold for inactivity.\nDormant workspaces are [automatically deleted](https://coder.com/docs/templates/schedule#dormancy-auto-deletion-enterprise) after 24 hours of inactivity.\nTo prevent deletion, use your workspace with the link below."
30+
"body": "Your workspace bobby-workspace has been marked as dormant (https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity exceeding the dormancy threshold.\n\nThis workspace will be automatically deleted in 24 hours if it remains inactive.\n\nTo prevent deletion, activate your workspace using the link below.",
31+
"body_markdown": "Your workspace **bobby-workspace** has been marked as [**dormant**](https://coder.com/docs/templates/schedule#dormancy-threshold-enterprise) due to inactivity exceeding the dormancy threshold.\n\nThis workspace will be automatically deleted in 24 hours if it remains inactive.\n\nTo prevent deletion, activate your workspace using the link below."
3232
}

0 commit comments

Comments
 (0)