Added list management commands, board filtering by project name, and enhanced skill documentation with bootstrap workflow and error handling patterns. Also added plumbing in to "pcli" binary for status syncing with Planka
This commit is contained in:
@@ -93,6 +93,8 @@ func printTable(data any, w io.Writer) error {
|
||||
return printTaskTable(data.([]model.Task), tw)
|
||||
case "Label":
|
||||
return printLabelTable(data.([]model.Label), tw)
|
||||
case "List":
|
||||
return printListTable(data.([]model.List), tw)
|
||||
case "Action":
|
||||
return printActionTable(data.([]model.Action), tw)
|
||||
default:
|
||||
@@ -115,6 +117,8 @@ func printTable(data any, w io.Writer) error {
|
||||
return printTaskTable([]model.Task{*data}, tw)
|
||||
case *model.Label:
|
||||
return printLabelTable([]model.Label{*data}, tw)
|
||||
case *model.List:
|
||||
return printListTable([]model.List{*data}, tw)
|
||||
case model.StatusSummary:
|
||||
return printStatusTable(data, tw)
|
||||
case *model.StatusSummary:
|
||||
@@ -200,6 +204,26 @@ func printLabelTable(labels []model.Label, tw *tabwriter.Writer) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func printListTable(lists []model.List, tw *tabwriter.Writer) error {
|
||||
fmt.Fprintln(tw, "ID\tNAME\tTYPE\tBOARD_ID\tPOSITION\tCOLOR")
|
||||
for _, l := range lists {
|
||||
name := ""
|
||||
if l.Name != nil {
|
||||
name = *l.Name
|
||||
}
|
||||
color := ""
|
||||
if l.Color != nil {
|
||||
color = *l.Color
|
||||
}
|
||||
position := ""
|
||||
if l.Position != nil {
|
||||
position = fmt.Sprintf("%.0f", *l.Position)
|
||||
}
|
||||
fmt.Fprintf(tw, "%s\t%s\t%s\t%s\t%s\t%s\n", l.ID, name, l.Type, l.BoardID, position, color)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func printActionTable(actions []model.Action, tw *tabwriter.Writer) error {
|
||||
fmt.Fprintln(tw, "ID\tTYPE\tCARD_ID\tCREATED_AT")
|
||||
for _, a := range actions {
|
||||
|
||||
Reference in New Issue
Block a user