(task *model.Task, commitType string, includeBody, short bool)
| 128 | } |
| 129 | |
| 130 | func 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 | |
| 150 | func buildMultiTaskMessage(tasks []*model.Task, commitType string, includeBody, short bool) string { |
| 151 | ids := make([]string, len(tasks)) |
no test coverage detected