mirror of
https://github.com/coder/coder.git
synced 2026-11-25 23:10:44 +08:00
chore: add workspace actions entitlement and experiment (#7361)
* added workspace actions entitlement * added workspace actions experiment
This commit is contained in:
Generated
+4
-2
@@ -7400,10 +7400,12 @@ const docTemplate = `{
|
||||
"codersdk.Experiment": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"moons"
|
||||
"moons",
|
||||
"workspace_actions"
|
||||
],
|
||||
"x-enum-varnames": [
|
||||
"ExperimentMoons"
|
||||
"ExperimentMoons",
|
||||
"ExperimentWorkspaceActions"
|
||||
]
|
||||
},
|
||||
"codersdk.Feature": {
|
||||
|
||||
Generated
+2
-2
@@ -6614,8 +6614,8 @@
|
||||
},
|
||||
"codersdk.Experiment": {
|
||||
"type": "string",
|
||||
"enum": ["moons"],
|
||||
"x-enum-varnames": ["ExperimentMoons"]
|
||||
"enum": ["moons", "workspace_actions"],
|
||||
"x-enum-varnames": ["ExperimentMoons", "ExperimentWorkspaceActions"]
|
||||
},
|
||||
"codersdk.Feature": {
|
||||
"type": "object",
|
||||
|
||||
@@ -46,6 +46,7 @@ const (
|
||||
FeatureAppearance FeatureName = "appearance"
|
||||
FeatureAdvancedTemplateScheduling FeatureName = "advanced_template_scheduling"
|
||||
FeatureWorkspaceProxy FeatureName = "workspace_proxy"
|
||||
FeatureWorkspaceActions FeatureName = "workspace_actions"
|
||||
)
|
||||
|
||||
// FeatureNames must be kept in-sync with the Feature enum above.
|
||||
@@ -61,6 +62,7 @@ var FeatureNames = []FeatureName{
|
||||
FeatureAppearance,
|
||||
FeatureAdvancedTemplateScheduling,
|
||||
FeatureWorkspaceProxy,
|
||||
FeatureWorkspaceActions,
|
||||
}
|
||||
|
||||
// Humanize returns the feature name in a human-readable format.
|
||||
@@ -1668,6 +1670,9 @@ const (
|
||||
// feature is not yet complete in functionality.
|
||||
ExperimentMoons Experiment = "moons"
|
||||
|
||||
// https://github.com/coder/coder/milestone/19
|
||||
ExperimentWorkspaceActions Experiment = "workspace_actions"
|
||||
|
||||
// Add new experiments here!
|
||||
// ExperimentExample Experiment = "example"
|
||||
)
|
||||
|
||||
+4
-3
@@ -2502,9 +2502,10 @@ CreateParameterRequest is a structure used to create a new parameter value for a
|
||||
|
||||
#### Enumerated Values
|
||||
|
||||
| Value |
|
||||
| ------- |
|
||||
| `moons` |
|
||||
| Value |
|
||||
| ------------------- |
|
||||
| `moons` |
|
||||
| `workspace_actions` |
|
||||
|
||||
## codersdk.Feature
|
||||
|
||||
|
||||
@@ -326,6 +326,7 @@ func (api *API) updateEntitlements(ctx context.Context) error {
|
||||
codersdk.FeatureExternalProvisionerDaemons: true,
|
||||
codersdk.FeatureAdvancedTemplateScheduling: true,
|
||||
codersdk.FeatureWorkspaceProxy: true,
|
||||
codersdk.FeatureWorkspaceActions: true,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
@@ -54,6 +54,7 @@ func TestEntitlements(t *testing.T) {
|
||||
codersdk.FeatureExternalProvisionerDaemons: 1,
|
||||
codersdk.FeatureAdvancedTemplateScheduling: 1,
|
||||
codersdk.FeatureWorkspaceProxy: 1,
|
||||
codersdk.FeatureWorkspaceActions: 1,
|
||||
},
|
||||
GraceAt: time.Now().Add(59 * 24 * time.Hour),
|
||||
})
|
||||
|
||||
@@ -1361,8 +1361,8 @@ export const Entitlements: Entitlement[] = [
|
||||
]
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export type Experiment = "moons"
|
||||
export const Experiments: Experiment[] = ["moons"]
|
||||
export type Experiment = "moons" | "workspace_actions"
|
||||
export const Experiments: Experiment[] = ["moons", "workspace_actions"]
|
||||
|
||||
// From codersdk/deployment.go
|
||||
export type FeatureName =
|
||||
@@ -1376,6 +1376,7 @@ export type FeatureName =
|
||||
| "scim"
|
||||
| "template_rbac"
|
||||
| "user_limit"
|
||||
| "workspace_actions"
|
||||
| "workspace_proxy"
|
||||
export const FeatureNames: FeatureName[] = [
|
||||
"advanced_template_scheduling",
|
||||
@@ -1388,6 +1389,7 @@ export const FeatureNames: FeatureName[] = [
|
||||
"scim",
|
||||
"template_rbac",
|
||||
"user_limit",
|
||||
"workspace_actions",
|
||||
"workspace_proxy",
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user