schedule daily standup advisories
This commit is contained in:
@@ -23,6 +23,22 @@ type GitSync struct {
|
||||
Branch, Head, Status string `json:"branch" json:"head" json:"status"`
|
||||
}
|
||||
|
||||
type StandupItem struct {
|
||||
TaskID string `json:"task_id"`
|
||||
State domain.TaskState `json:"state"`
|
||||
Title string `json:"title,omitempty"`
|
||||
}
|
||||
|
||||
func StandupItems(tasks []domain.Task) []StandupItem {
|
||||
out := make([]StandupItem, 0)
|
||||
for _, t := range tasks {
|
||||
if t.State == domain.StateQueued || t.State == domain.StateLeased || t.State == domain.StateBlocked {
|
||||
out = append(out, StandupItem{t.ID, t.State, t.Title})
|
||||
}
|
||||
}
|
||||
return out
|
||||
}
|
||||
|
||||
// BuildBrief folds only events in [from,to]. It is deliberately read-only.
|
||||
func BuildBrief(events []domain.Event, from, to time.Time, git GitSync) Brief {
|
||||
b := Brief{From: from, To: to, Quota: map[string]float64{}, Git: git}
|
||||
|
||||
Reference in New Issue
Block a user