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

Function changeVersion

site/src/api/queries/workspaces.ts:284–308  ·  view source on GitHub ↗
(
	workspace: Workspace,
	queryClient: QueryClient,
	isDynamicParametersEnabled: boolean,
)

Source from the content-addressed store, hash-verified

282};
283
284export const changeVersion = (
285 workspace: Workspace,
286 queryClient: QueryClient,
287 isDynamicParametersEnabled: boolean,
288) => {
289 return {
290 mutationFn: ({
291 versionId,
292 buildParameters,
293 }: {
294 versionId: string;
295 buildParameters?: WorkspaceBuildParameter[];
296 }) => {
297 return API.changeWorkspaceVersion(
298 workspace,
299 versionId,
300 buildParameters,
301 isDynamicParametersEnabled,
302 );
303 },
304 onSuccess: async (build: WorkspaceBuild) => {
305 await updateWorkspaceBuild(build, queryClient);
306 },
307 };
308};
309
310export const updateWorkspace = (
311 workspace: Workspace,

Callers 1

WorkspaceMoreActionsFunction · 0.90

Calls 1

updateWorkspaceBuildFunction · 0.85

Tested by

no test coverage detected