task description auto
This commit is contained in:
@@ -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 := ""
|
||||
|
||||
Reference in New Issue
Block a user