addDependencyEntries populates the Dependencies field on the result.
(task *model.Task, allTasks []*model.Task, result *taskcontext.Result)
| 142 | |
| 143 | // addDependencyEntries populates the Dependencies field on the result. |
| 144 | func addDependencyEntries(task *model.Task, allTasks []*model.Task, result *taskcontext.Result) { |
| 145 | if len(task.Dependencies) == 0 { |
| 146 | return |
| 147 | } |
| 148 | taskMap := buildTaskMap(allTasks) |
| 149 | for _, depID := range task.Dependencies { |
| 150 | entry := taskcontext.DepEntry{ID: depID} |
| 151 | if dep, ok := taskMap[depID]; ok { |
| 152 | entry.Title = dep.Title |
| 153 | entry.Status = string(dep.Status) |
| 154 | } |
| 155 | result.Dependencies = append(result.Dependencies, entry) |
| 156 | } |
| 157 | } |
| 158 | |
| 159 | func outputContext(result *taskcontext.Result, format string) error { |
| 160 | switch format { |
no test coverage detected