removed name filtering prior to demo
This commit is contained in:
+1
-21
@@ -12,32 +12,14 @@ import (
|
||||
var statusCmd = &cobra.Command{
|
||||
Use: "status",
|
||||
Short: "Show status summary of boards and their lists",
|
||||
Long: "Displays a summary of boards, their lists, and the number of cards in each list.\nUse --project to filter by project name.",
|
||||
Long: "Displays a summary of boards, their lists, and the number of cards in each list.",
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
projectName, _ := cmd.Flags().GetString("project")
|
||||
|
||||
// Get all boards
|
||||
boards, err := getClient().ListBoards(getContext())
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to list boards: %w", err)
|
||||
}
|
||||
|
||||
// Filter boards by project if --project flag is provided
|
||||
if projectName != "" {
|
||||
projectID, err := resolveProjectNameToID(projectName)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
filtered := boards[:0]
|
||||
for _, board := range boards {
|
||||
if board.ProjectID == projectID {
|
||||
filtered = append(filtered, board)
|
||||
}
|
||||
}
|
||||
boards = filtered
|
||||
}
|
||||
|
||||
// Build status summary with error collection
|
||||
summary := model.StatusSummary{
|
||||
TotalBoards: len(boards),
|
||||
@@ -120,6 +102,4 @@ var statusCmd = &cobra.Command{
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(statusCmd)
|
||||
|
||||
statusCmd.Flags().String("project", "", "Filter status by project name")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user