forked from coder/coder
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
1,576 additions
and
5,354 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
https://coder.com/docs/CONTRIBUTING |
This file contains 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
This file contains 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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Package apiversion provides an API version type that can be used to validate | ||
// compatibility between two API versions. | ||
// | ||
// NOTE: API VERSIONS ARE NOT SEMANTIC VERSIONS. | ||
// | ||
// API versions are represented as major.minor where major and minor are both | ||
// positive integers. | ||
// | ||
// API versions are not directly tied to a specific release of the software. | ||
// Instead, they are used to represent the capabilities of the server. For | ||
// example, a server that supports API version 1.2 should be able to handle | ||
// requests from clients that support API version 1.0, 1.1, or 1.2. | ||
// However, a server that supports API version 2.0 is not required to handle | ||
// requests from clients that support API version 1.x. | ||
// Clients may need to negotiate with the server to determine the highest | ||
// supported API version. | ||
// | ||
// When making a change to the API, use the following rules to determine the | ||
// next API version: | ||
// 1. If the change is backward-compatible, increment the minor version. | ||
// Examples of backward-compatible changes include adding new fields to | ||
// a response or adding new endpoints. | ||
// 2. If the change is not backward-compatible, increment the major version. | ||
// Examples of non-backward-compatible changes include removing or renaming | ||
// fields. | ||
package apiversion |
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
1 change: 1 addition & 0 deletions
1
coderd/database/migrations/000280_workspace_update_notification.down.sql
This file contains 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
DELETE FROM notification_templates WHERE id = 'd089fe7b-d5c5-4c0c-aaf5-689859f7d392'; |
30 changes: 30 additions & 0 deletions
30
coderd/database/migrations/000280_workspace_update_notification.up.sql
This file contains 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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
INSERT INTO notification_templates | ||
(id, name, title_template, body_template, "group", actions) | ||
VALUES ( | ||
'd089fe7b-d5c5-4c0c-aaf5-689859f7d392', | ||
'Workspace Manually Updated', | ||
E'Workspace ''{{.Labels.workspace}}'' has been manually updated', | ||
E'Hello {{.UserName}},\n\n'|| | ||
E'A new workspace build has been manually created for your workspace **{{.Labels.workspace}}** by **{{.Labels.initiator}}** to update it to version **{{.Labels.version}}** of template **{{.Labels.template}}**.', | ||
'Workspace Events', | ||
'[ | ||
{ | ||
"label": "View workspace", | ||
"url": "{{base_url}}/@{{.UserUsername}}/{{.Labels.workspace}}" | ||
}, | ||
{ | ||
"label": "View template version", | ||
"url": "{{base_url}}/templates/{{.Labels.organization}}/{{.Labels.template}}/versions/{{.Labels.version}}" | ||
} | ||
]'::jsonb | ||
); | ||
|
||
UPDATE notification_templates | ||
SET | ||
actions = '[ | ||
{ | ||
"label": "View workspace", | ||
"url": "{{base_url}}/@{{.UserUsername}}/{{.Labels.workspace}}" | ||
} | ||
]'::jsonb | ||
WHERE id = '281fdf73-c6d6-4cbb-8ff5-888baf8a2fff'; |
This file contains 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
This file contains 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
Oops, something went wrong.