-
Notifications
You must be signed in to change notification settings - Fork 899
fix: fix dormancy notifications #14029
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
Changes from 1 commit
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
630dd87
Test notification templates and update them
BrunoQuaresma a6bcef9
Fix lint
BrunoQuaresma 97514f5
Fix SQL
BrunoQuaresma 4b75dcf
Fix workspace test
BrunoQuaresma 008a410
Fix lint
BrunoQuaresma 799644e
Fix tests
BrunoQuaresma 34f8aa4
Fix test
BrunoQuaresma 5da3745
Remove sqlc query in favor of inline sql for tests
BrunoQuaresma 7bdce48
Update coderd/workspaces.go
BrunoQuaresma fc055c8
Update coderd/autobuild/lifecycle_executor.go
BrunoQuaresma 9490792
Update coderd/autobuild/lifecycle_executor.go
BrunoQuaresma cb1ca3b
Update coderd/autobuild/lifecycle_executor.go
BrunoQuaresma de1d381
Merge branch 'main' of https://github.com/coder/coder into bq/fix-dor…
BrunoQuaresma e7557d2
Apply Dannys suggestion
BrunoQuaresma 886a482
Merge branch 'bq/fix-dormancy-template' of https://github.com/coder/c…
BrunoQuaresma ab344b3
Verify if body and title are not empty
BrunoQuaresma File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Apply Dannys suggestion
- Loading branch information
commit e7557d2ce10c161e29ab252b156b975421ed7643
There are no files selected for viewing
11 changes: 0 additions & 11 deletions
11
coderd/database/migrations/000232_update_dormancy_notification_template.down.sql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +0,0 @@ | ||
UPDATE notification_templates | ||
SET | ||
body_template = 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 }})**\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.' | ||
WHERE | ||
id = '0ea69165-ec14-4314-91f1-69566ac3c5a0'; | ||
|
||
UPDATE notification_templates | ||
SET | ||
body_template = 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}}**\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.' | ||
WHERE | ||
id = '51ce2fdf-c9ca-4be1-8d70-628674f9bc42'; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.