MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / updateTask

Function updateTask

source code/utils/tasks.ts:372–393  ·  view source on GitHub ↗
(
  taskListId: string,
  taskId: string,
  updates: Partial<Omit<Task, 'id'>>,
)

Source from the content-addressed store, hash-verified

370}
371
372export async function updateTask(
373 taskListId: string,
374 taskId: string,
375 updates: Partial<Omit<Task, 'id'>>,
376): Promise<Task | null> {
377 const path = getTaskPath(taskListId, taskId)
378
379 // Check existence before locking — proper-lockfile throws if the
380 // target file doesn't exist, and we want a clean null result.
381 const taskBeforeLock = await getTask(taskListId, taskId)
382 if (!taskBeforeLock) {
383 return null
384 }
385
386 let release: (() => Promise<void>) | undefined
387 try {
388 release = await lockfile.lock(path, LOCK_OPTIONS)
389 return await updateTaskUnsafe(taskListId, taskId, updates)
390 } finally {
391 await release?.()
392 }
393}
394
395export async function deleteTask(
396 taskListId: string,

Callers 7

callFunction · 0.85
deleteTaskFunction · 0.85
blockTaskFunction · 0.85
claimTaskWithBusyCheckFunction · 0.85
unassignTeammateTasksFunction · 0.85
tryClaimNextTaskFunction · 0.85
useTaskListWatcherFunction · 0.85

Calls 4

getTaskPathFunction · 0.85
getTaskFunction · 0.85
updateTaskUnsafeFunction · 0.85
releaseFunction · 0.50

Tested by

no test coverage detected