fix: assignee output #74

Merged
noe.trevino merged 2 commits from fix/assignee-output into main 2026-02-15 00:32:56 -06:00
Owner
  • struct didnt implement the interface for pretty print, was falling back to ugly output
- struct didnt implement the interface for pretty print, was falling back to ugly output
Author
Owner

Closes: #72

Closes: #72
github-actions[bot] commented 2026-02-15 00:15:12 -06:00 (Migrated from github.com)

PR Summary (auto-generated)

  • Fixed assignee creation output by implementing the PrettyPrintable interface for assigneeCreateResult struct
  • Previously fell back to ugly default output format; now uses styled output with success message and details
  • Added PrettyPrint method that displays assignee ID and name using the RenderSuccessWithDetails helper
  • Changes isolated to internal/cli/assignee/create.go with new imports for strconv, styles, and colors packages
**PR Summary** _(auto-generated)_ - Fixed assignee creation output by implementing the PrettyPrintable interface for assigneeCreateResult struct - Previously fell back to ugly default output format; now uses styled output with success message and details - Added PrettyPrint method that displays assignee ID and name using the RenderSuccessWithDetails helper - Changes isolated to internal/cli/assignee/create.go with new imports for strconv, styles, and colors packages
claude[bot] (Migrated from github.com) reviewed 2026-02-15 00:15:31 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-15 00:15:31 -06:00

DRY violation: The pattern of creating a []styles.Detail slice and calling styles.RenderSuccessWithDetails is duplicated across task/create.go, project/create.go, label/create.go, and now assignee/create.go.

This entire PrettyPrint method implementation is nearly identical in all these files:

  • task/create.go:234-252
  • project/create.go:155-172
  • label/create.go:134-143
  • assignee/create.go:95-102

Consider extracting a helper function or using struct field reflection to generate the details slice automatically, reducing code duplication and maintenance burden.

**DRY violation**: The pattern of creating a `[]styles.Detail` slice and calling `styles.RenderSuccessWithDetails` is duplicated across `task/create.go`, `project/create.go`, `label/create.go`, and now `assignee/create.go`. This entire `PrettyPrint` method implementation is nearly identical in all these files: - `task/create.go:234-252` - `project/create.go:155-172` - `label/create.go:134-143` - `assignee/create.go:95-102` Consider extracting a helper function or using struct field reflection to generate the details slice automatically, reducing code duplication and maintenance burden.
claude[bot] (Migrated from github.com) reviewed 2026-02-15 00:15:34 -06:00
claude[bot] (Migrated from github.com) commented 2026-02-15 00:15:34 -06:00

Redundant validation: The parseCreateFlags function validates that name is not empty, but this check is redundant because:

  1. Line 40-43 marks the flag as required using cmd.MarkFlagRequired("name")
  2. Cobra will automatically validate required flags before RunE is called

This validation logic is dead code that can never be reached with an empty name. Either remove this function entirely or remove the redundant check.

**Redundant validation**: The `parseCreateFlags` function validates that `name` is not empty, but this check is redundant because: 1. Line 40-43 marks the flag as required using `cmd.MarkFlagRequired("name")` 2. Cobra will automatically validate required flags before RunE is called This validation logic is dead code that can never be reached with an empty name. Either remove this function entirely or remove the redundant check.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
noe.trevino/paso!74
No description provided.