task description auto

This commit is contained in:
Ian Gulliver
2026-10-20 08:57:37 -07:00
parent 8f3226350e
commit d530ec5edc
20 changed files with 434 additions and 342 deletions
+15
View File
@@ -391,6 +391,21 @@ func (s *Store) SetMergeTitle(ctx context.Context, id, title, actor string) erro
})
}
func (s *Store) SetTitle(ctx context.Context, id, title, actor string) error {
return s.write(ctx, func(tx *sql.Tx, emit emitFunc) error {
projectID := ""
err := tx.QueryRowContext(ctx, `UPDATE tasks SET title = ? WHERE id = ? AND status = ? AND merging_by = '' AND finalizing = '' AND merge_queued_by = '' RETURNING project_id`,
title, id, string(api.TaskStatusActive)).Scan(&projectID)
if errors.Is(err, sql.ErrNoRows) {
return ErrNotFound
}
if err != nil {
return err
}
return emit(api.Event{Kind: "task.title", ProjectId: &projectID, TaskId: &id, Actor: actor, Payload: map[string]any{"id": id, "title": title}})
})
}
func (s *Store) SetMergingBy(ctx context.Context, id, login string) error {
return s.write(ctx, func(tx *sql.Tx, emit emitFunc) error {
projectID := ""