-
Notifications
You must be signed in to change notification settings - Fork 936
feat(coderd): notify when workspace is marked as dormant #13868
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
9a398e7
fbf99be
40e5801
9a35cbb
0701572
64cf76b
b2f9180
a445c4c
bdc08d6
ee7d542
f6db3c7
95c784a
68bcfb0
467a797
853e59e
bbcb28e
e3c6f49
20a8766
e087172
4b99061
1932168
36c043c
d07f9d8
21f7c35
72da82d
b49cd08
6f61f9f
281b545
7f73d90
7c5de97
299cd7f
16a3c19
cf9eaec
aea55aa
6d47c04
7b4ae29
308bd69
10ff6cf
48ad269
0226fdf
4d71c94
e1d5fec
a2023a1
bae985c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
DELETE FROM notification_templates | ||
WHERE | ||
id = '0ea69165-ec14-4314-91f1-69566ac3c5a0'; | ||
|
||
DELETE FROM notification_templates | ||
WHERE | ||
id = '51ce2fdf-c9ca-4be1-8d70-628674f9bc42'; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
INSERT INTO | ||
notification_templates ( | ||
id, | ||
name, | ||
title_template, | ||
body_template, | ||
"group", | ||
actions | ||
) | ||
VALUES ( | ||
'0ea69165-ec14-4314-91f1-69566ac3c5a0', | ||
'Workspace Marked as Dormant', | ||
E'Workspace "{{.Labels.name}}" marked as dormant', | ||
E'Hi {{.UserName}}\n\n' || E'Your workspace **{{.Labels.name}}** has been marked as **dormant**.\n' || E'The specified reason was "**{{.Labels.reason}} (initiated by: {{ .Labels.initiator }}){{end}}**\n\n' || E'Dormancy refers to a workspace being unused for a defined length of time, and after it exceeds {{.Labels.dormancyHours}} hours of dormancy might be deleted.\n' || E'To activate your workspace again, simply use it as normal.', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The wording is a little weird here. Can we change it and add a link to the dormancy docs: I don't think we need to include the initiator, just improve the reasons (see end of message).
Append if dormancy cleanup is enabled and
Append if dormancy cleanup is enabled, and
The reasons also fit into differing grammatic context:
If we use these, they'd fit the above messages better.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Going to refactor the templates in the next PR to avoid further postponement. |
||
'Workspace Events', | ||
'[ | ||
{ | ||
"label": "View workspace", | ||
"url": "{{ base_url }}/@{{.UserName}}/{{.Labels.name}}" | ||
} | ||
]'::jsonb | ||
), | ||
( | ||
'51ce2fdf-c9ca-4be1-8d70-628674f9bc42', | ||
'Workspace Marked for Deletion', | ||
E'Workspace "{{.Labels.name}}" marked for deletion', | ||
E'Hi {{.UserName}}\n\n' || E'Your workspace **{{.Labels.name}}** has been marked for **deletion** after {{.Labels.dormancyHours}} hours of dormancy.\n' || E'The specified reason was "**{{.Labels.reason}}{{end}}**\n\n' || E'Dormancy refers to a workspace being unused for a defined length of time, and after it exceeds {{.Labels.dormancyHours}} hours of dormancy it will be deleted.\n' || E'To prevent your workspace from being deleted, simply use it as normal.', | ||
'Workspace Events', | ||
'[ | ||
{ | ||
"label": "View workspace", | ||
"url": "{{ base_url }}/@{{.UserName}}/{{.Labels.name}}" | ||
} | ||
]'::jsonb | ||
); |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.