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

Function buildSingleTaskMessage

apps/cli/internal/cli/commit_msg.go:130–148  ·  view source on GitHub ↗
(task *model.Task, commitType string, includeBody, short bool)

Source from the content-addressed store, hash-verified

128}
129
130func buildSingleTaskMessage(task *model.Task, commitType string, includeBody, short bool) string {
131 subject := formatSubjectLine(task, commitType)
132 if short {
133 return subject + "\n"
134 }
135
136 var parts []string
137 parts = append(parts, subject)
138
139 if includeBody {
140 subtasks := extractCompletedSubtasks(task.Body)
141 if len(subtasks) > 0 {
142 body := formatSubtaskBullets(subtasks)
143 parts = append(parts, body)
144 }
145 }
146
147 return strings.Join(parts, "\n\n") + "\n"
148}
149
150func buildMultiTaskMessage(tasks []*model.Task, commitType string, includeBody, short bool) string {
151 ids := make([]string, len(tasks))

Callers 1

buildCommitMessageFunction · 0.85

Calls 3

formatSubjectLineFunction · 0.85
extractCompletedSubtasksFunction · 0.85
formatSubtaskBulletsFunction · 0.85

Tested by

no test coverage detected