Add review workflows, tree-shaped workflows and a workflow editor
This commit is contained in:
@@ -18,7 +18,7 @@ type FrozenWorkflow struct {
|
||||
}
|
||||
|
||||
func (s *Store) ListWorkflows(ctx context.Context) ([]api.WorkflowSummary, error) {
|
||||
rows, err := s.db.QueryContext(ctx, `SELECT name, coalesce(json_extract(definition, '$.description'), '') FROM workflows ORDER BY name`)
|
||||
rows, err := s.db.QueryContext(ctx, `SELECT name, coalesce(json_extract(definition, '$.description'), ''), coalesce(nullif(json_extract(definition, '$.kind'), ''), 'task') FROM workflows ORDER BY name`)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -27,7 +27,7 @@ func (s *Store) ListWorkflows(ctx context.Context) ([]api.WorkflowSummary, error
|
||||
workflows := []api.WorkflowSummary{}
|
||||
for rows.Next() {
|
||||
w := api.WorkflowSummary{}
|
||||
err = rows.Scan(&w.Name, &w.Description)
|
||||
err = rows.Scan(&w.Name, &w.Description, &w.Kind)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user