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
+5 -1
View File
@@ -94,6 +94,9 @@ func (s *Store) apply(e domain.Event) error {
return err
}
t := s.tasks[e.TaskID]
if e.Type == "QuotaReported" || e.Type == "StandupAdvisory" {
return nil
}
switch e.Type {
case "TaskCreated":
if err := domain.ValidateCreated(p); err != nil {
@@ -193,7 +196,8 @@ func (s *Store) Append(e domain.Event) error {
return domain.ErrConflict
}
}
if !taskExists && e.Type != "TaskCreated" {
global := e.Type == "QuotaReported" || e.Type == "StandupAdvisory"
if !taskExists && e.Type != "TaskCreated" && !global {
return domain.ErrNotFound
}
if e.Type != "TaskCreated" && (e.Type == "TaskCompleted" || e.Type == "TaskBlocked" || e.Type == "TaskReleased") {