MCPcopy Index your code
hub / github.com/coder/coder / workspaceUpdatePolicy

Function workspaceUpdatePolicy

site/src/utils/workspace.tsx:269–279  ·  view source on GitHub ↗
(
	workspace: TypesGen.Workspace,
	canChangeVersions: boolean,
)

Source from the content-addressed store, hash-verified

267};
268
269const workspaceUpdatePolicy = (
270 workspace: TypesGen.Workspace,
271 canChangeVersions: boolean,
272): TypesGen.AutomaticUpdates => {
273 // If a template requires the active version and you cannot change versions
274 // (restricted to template admins), then your policy must be "Always".
275 if (workspace.template_require_active_version && !canChangeVersions) {
276 return "always";
277 }
278 return workspace.automatic_updates;
279};
280
281// These resources (i.e. docker_image, kubernetes_deployment) map to Terraform
282// resource types. These are the most used ones and are based on user usage.

Callers 1

mustUpdateWorkspaceFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected