MCPcopy Index your code
hub / github.com/MrLesk/Backlog.md / loadTask

Method loadTask

src/file-system/operations.ts:346–360  ·  view source on GitHub ↗
(taskId: string)

Source from the content-addressed store, hash-verified

344 }
345
346 async loadTask(taskId: string): Promise<Task | null> {
347 try {
348 const tasksDir = await this.getTasksDir();
349 const core = { filesystem: { tasksDir } };
350 const filepath = await getTaskPath(taskId, core as TaskPathContext);
351
352 if (!filepath) return null;
353
354 const content = await Bun.file(filepath).text();
355 const task = normalizeTaskIdentity(parseTask(content));
356 return { ...task, filePath: filepath };
357 } catch (_error) {
358 return null;
359 }
360 }
361
362 async listTasks(filter?: TaskListFilter): Promise<Task[]> {
363 let tasksDir: string;

Callers 15

demoteTaskMethod · 0.95
watchTasksFunction · 0.80
getTaskMethod · 0.80
loadTaskByIdMethod · 0.80
finalizeCreatedTaskMethod · 0.80
updateTaskMethod · 0.80
updateTaskFromInputMethod · 0.80
editTaskOrDraftMethod · 0.80
archiveTaskMethod · 0.80
addAcceptanceCriteriaMethod · 0.80

Calls 4

getTasksDirMethod · 0.95
getTaskPathFunction · 0.90
normalizeTaskIdentityFunction · 0.90
parseTaskFunction · 0.90

Tested by

no test coverage detected