mirror of
https://github.com/coder/coder.git
synced 2025-07-15 22:20:27 +00:00
feat: add tool to send a test notification (#16611)
Relates to https://github.com/coder/coder/issues/16463 Adds a CLI command, and API endpoint, to trigger a test notification for administrators of a deployment.
This commit is contained in:
@ -0,0 +1 @@
|
||||
DELETE FROM notification_templates WHERE id = 'c425f63e-716a-4bf4-ae24-78348f706c3f';
|
16
coderd/database/migrations/000295_test_notification.up.sql
Normal file
16
coderd/database/migrations/000295_test_notification.up.sql
Normal file
@ -0,0 +1,16 @@
|
||||
INSERT INTO notification_templates
|
||||
(id, name, title_template, body_template, "group", actions)
|
||||
VALUES (
|
||||
'c425f63e-716a-4bf4-ae24-78348f706c3f',
|
||||
'Test Notification',
|
||||
E'A test notification',
|
||||
E'Hi {{.UserName}},\n\n'||
|
||||
E'This is a test notification.',
|
||||
'Notification Events',
|
||||
'[
|
||||
{
|
||||
"label": "View notification settings",
|
||||
"url": "{{base_url}}/deployment/notifications?tab=settings"
|
||||
}
|
||||
]'::jsonb
|
||||
);
|
Reference in New Issue
Block a user