MCPcopy Create free account
hub / github.com/driangle/taskmd / UpdateSyncedTaskFile

Function UpdateSyncedTaskFile

apps/cli/internal/sync/writer.go:33–51  ·  view source on GitHub ↗

UpdateSyncedTaskFile updates an existing synced task file.

(filePath string, mapped MappedTask)

Source from the content-addressed store, hash-verified

31
32// UpdateSyncedTaskFile updates an existing synced task file.
33func UpdateSyncedTaskFile(filePath string, mapped MappedTask) error {
34 req := taskfile.UpdateRequest{
35 Status: &mapped.Status,
36 Title: &mapped.Title,
37 }
38 if mapped.Priority != "" {
39 req.Priority = &mapped.Priority
40 }
41 if mapped.Owner != "" {
42 req.Owner = &mapped.Owner
43 }
44 if len(mapped.Tags) > 0 {
45 req.Tags = &mapped.Tags
46 }
47 if mapped.Description != "" {
48 req.Body = &mapped.Description
49 }
50 return taskfile.UpdateTaskFile(filePath, req)
51}
52
53func renderTaskFile(id string, mapped MappedTask, externalID, sourceName string) string {
54 var b strings.Builder

Callers 1

applyExternalUpdateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected