schedule daily standup advisories

This commit is contained in:
kami
2026-07-26 20:35:57 +04:00
parent 6392e4e196
commit b4d9621d89
4 changed files with 64 additions and 1 deletions
+16
View File
@@ -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}