Skip to content

feat(coderd/notifications): improve notification format consistency #14967

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

Merged
merged 20 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
70f3486
feat(notifications): Improve notification format consistency
SasSwart Oct 3, 2024
7e31a34
chore(coderd/notifications): regenerate notification testdata from th…
SasSwart Oct 5, 2024
cf3afd4
Merge remote-tracking branch 'origin/main' into jjs/consistent-notifi…
SasSwart Oct 5, 2024
4b85f2b
chore(coderd/database): renumber migration
SasSwart Oct 5, 2024
e8ad3ac
chore(coderd/notifications): regenerate testdata
SasSwart Oct 5, 2024
2a4d740
fix(coderd/notifications): remove duplicate function signature
SasSwart Oct 5, 2024
e741c43
chore: remove redundant escaping in migration
SasSwart Oct 5, 2024
adffe60
chore(coderd/notifications): improve failed test feedback
SasSwart Oct 5, 2024
41ed54a
feat(coderd/database): add new information to the account activated n…
SasSwart Oct 7, 2024
5541331
Merge remote-tracking branch 'origin/main' into jjs/additional-notifi…
SasSwart Oct 8, 2024
fe94f0d
chore(coderd/database): rework migration for legibility
SasSwart Oct 8, 2024
98e7501
feat(coderd): send newly required information to notification templates
SasSwart Oct 8, 2024
d8e00c2
feat(coderd/notifications): provide additional context to workspace n…
SasSwart Oct 8, 2024
d6a339f
fix(coderd/notifications): add a missing call to fmt.Sprintf
SasSwart Oct 8, 2024
920ad31
fix(coderd/notifications): fix oversights in template migration
SasSwart Oct 9, 2024
9e938e5
chore(coderd/provisionerdserver): set the displayname in TestNotifica…
SasSwart Oct 9, 2024
59e57ac
chore(coderd): add more robust testing assertions to TestNotifyDelete…
SasSwart Oct 9, 2024
c907238
chore(coderd/notifications): fix migration indentation
SasSwart Oct 9, 2024
2493556
chore(coderd/notifications): regenerate golden files
SasSwart Oct 9, 2024
19dccc8
Merge remote-tracking branch 'origin/main' into jjs/consistent-notifi…
SasSwart Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(coderd/database): renumber migration
  • Loading branch information
SasSwart committed Oct 5, 2024
commit 4b85f2bb1441e4d71d482a10a59630e8c651ac76

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', 'Hi {{.UserName}}')::text
WHERE
id = '29a09665-2a4c-403f-9648-54301670e7be';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', E'Hi {{.UserName}},')::text
WHERE
id = '9f5af851-8408-4e73-a7a1-c6502ba46689';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', E'Hi {{.UserName}},')::text
WHERE
id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', E'Hi {{.UserName}}')::text
WHERE
id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'({{.Labels.template_version_name}}).\n\n', E'({{.Labels.template_version_name}}).\n')::text
WHERE
id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', E'Hi {{.UserName}}')::text
WHERE
id = '381df2a9-c0c0-4749-420f-80a9280c66f9';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'\nThe specified reason', E'The specified reason')::text
WHERE
id = '381df2a9-c0c0-4749-420f-80a9280c66f9';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},', E'Hi {{.UserName}}')::text
WHERE
id = 'f517da0b-cdc9-410f-ab89-a86107c420ed';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'\nThe specified reason', E'The specified reason')::text
WHERE
id = 'f517da0b-cdc9-410f-ab89-a86107c420ed';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},', E'Hi {{.UserName}}')::text
WHERE
id = '0ea69165-ec14-4314-91f1-69566ac3c5a0';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},', E'Hi {{.UserName}}')::text
WHERE
id = '51ce2fdf-c9ca-4be1-8d70-628674f9bc42';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'\nThe workspace build was initiated by', E'The workspace build was initiated by')::text
WHERE
id = '2faeee0f-26cb-4e96-821c-85ccb9f71513';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', 'Hi {{.UserName}},')::text
WHERE
id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, E'Hi {{.UserName}},\n', 'Hi {{.UserName}},')::text
WHERE
id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff';
Original file line number Diff line number Diff line change
Expand Up @@ -6,37 +6,37 @@ WHERE

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text
WHERE
id = '9f5af851-8408-4e73-a7a1-c6502ba46689';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text
WHERE
id = 'b02ddd82-4733-4d02-a2d7-c36f3598997d';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', E'Hi {{.UserName}},\n')::text
WHERE
id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, '({{.Labels.template_version_name}}).\n', '({{.Labels.template_version_name}}).\n\n')::text
body_template = REPLACE(body_template::text, E'({{.Labels.template_version_name}}).\n', E'({{.Labels.template_version_name}}).\n\n')::text
WHERE
id = 'c34a0c09-0704-4cac-bd1c-0c0146811c2b';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}}', E'Hi {{.UserName}},\n')::text
WHERE
id = '381df2a9-c0c0-4749-420f-80a9280c66f9';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'The specified reason', '\nThe specified reason')::text
body_template = REPLACE(body_template::text, 'The specified reason', E'\nThe specified reason')::text
WHERE
id = '381df2a9-c0c0-4749-420f-80a9280c66f9';

Expand All @@ -48,7 +48,7 @@ WHERE

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'The specified reason', '\nThe specified reason')::text
body_template = REPLACE(body_template::text, 'The specified reason', E'\nThe specified reason')::text
WHERE
id = 'f517da0b-cdc9-410f-ab89-a86107c420ed';

Expand All @@ -66,18 +66,18 @@ WHERE

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'The workspace build was initiated by', '\nThe workspace build was initiated by')::text
body_template = REPLACE(body_template::text, 'The workspace build was initiated by', E'\nThe workspace build was initiated by')::text
WHERE
id = '2faeee0f-26cb-4e96-821c-85ccb9f71513';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text
WHERE
id = '1a6a6bea-ee0a-43e2-9e7c-eabdb53730e4';

UPDATE notification_templates
SET
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', 'Hi {{.UserName}},\n')::text
body_template = REPLACE(body_template::text, 'Hi {{.UserName}},', E'Hi {{.UserName}},\n')::text
WHERE
id = '6a2f0609-9b69-4d36-a989-9f5925b6cbff';