(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo)
| 553 | } |
| 554 | |
| 555 | func buildGetOutput(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo) getOutput { |
| 556 | created := "" |
| 557 | if !task.Created.IsZero() { |
| 558 | created = task.Created.Format("2006-01-02") |
| 559 | } |
| 560 | out := getOutput{ |
| 561 | ID: task.ID, |
| 562 | Title: task.Title, |
| 563 | Status: string(task.Status), |
| 564 | Priority: string(task.Priority), |
| 565 | Effort: string(task.Effort), |
| 566 | Type: string(task.Type), |
| 567 | Phase: task.Phase, |
| 568 | Tags: task.Tags, |
| 569 | PRs: task.PRs, |
| 570 | Parent: deps.Parent, |
| 571 | Created: created, |
| 572 | FilePath: task.FilePath, |
| 573 | Content: strings.TrimSpace(task.Body), |
| 574 | Dependencies: getDepsJSON{ |
| 575 | DependsOn: deps.DependsOn, |
| 576 | Blocks: deps.Blocks, |
| 577 | }, |
| 578 | Children: deps.Children, |
| 579 | Worklog: wl, |
| 580 | } |
| 581 | if len(ctxFiles) > 0 { |
| 582 | out.ContextFiles = ctxFiles |
| 583 | } |
| 584 | return out |
| 585 | } |
| 586 | |
| 587 | func outputGetJSON(task *model.Task, deps dependencyInfo, ctxFiles []taskcontext.FileEntry, wl *worklogInfo, w io.Writer) error { |
| 588 | return WriteJSON(w, buildGetOutput(task, deps, ctxFiles, wl)) |
no outgoing calls
no test coverage detected