feat(status): add --project flag for filtering boards by project name

- Implemented the --project flag in the pcli status command to filter boards based on the specified project name.
- Updated the command to resolve project names to IDs using case-insensitive matching.
- Adjusted the totalBoards count in the output to reflect the number of boards matching the project filter.
- Enhanced command help text and README documentation to include usage examples for the new flag.
- Verified functionality through manual testing and ensured default behavior remains unchanged when the flag is omitted.

feat(board): expand GetBoard response to include labels and card associations

- Modified the Board struct to include Labels, CardLabels, and CardMemberships fields.
- Updated the GetBoard method to parse additional fields from the API response.
- Enhanced ListCardsByBoard to include label names for each card based on the enriched board data.
- Ensured backward compatibility by making new fields optional and preserving existing output structure.
This commit is contained in:
Steve Cliff
2026-02-18 21:38:41 +00:00
parent 22d5848e1a
commit 7937266262
17 changed files with 61 additions and 10 deletions
+15 -2
View File
@@ -71,11 +71,24 @@ The client SHALL provide methods to list all accessible projects (`GET /projects
- **THEN** the client SHALL send `DELETE /projects/{id}`
### Requirement: Board operations
The client SHALL provide a method to get a single board by ID (`GET /boards/{id}`), list board actions (`GET /boards/{boardId}/actions`) with pagination support, create a board (`POST /projects/{projectId}/boards`), and delete a board (`DELETE /boards/{id}`).
The client SHALL provide a method to get a single board by ID (`GET /boards/{id}`), list board actions (`GET /boards/{boardId}/actions`) with pagination support, create a board (`POST /projects/{projectId}/boards`), and delete a board (`DELETE /boards/{id}`). `GetBoard` SHALL parse the `included` object from the response and populate the Board model with `lists`, `cards`, `labels`, `cardLabels`, and `cardMemberships`.
#### Scenario: Get board
- **WHEN** `GetBoard` is called with a board ID
- **THEN** the client SHALL send `GET /boards/{id}` and return a Board model including its included lists
- **THEN** the client SHALL send `GET /boards/{id}` and return a Board model including its included lists, cards, labels, cardLabels, and cardMemberships
#### Scenario: Get board includes labels
- **WHEN** `GetBoard` is called and the board has labels defined
- **THEN** the returned Board SHALL contain a `Labels` slice with all board labels
#### Scenario: Get board includes card-label associations
- **WHEN** `GetBoard` is called and cards on the board have labels attached
- **THEN** the returned Board SHALL contain a `CardLabels` slice with all card-label associations
- **AND** each `CardLabel` entry SHALL contain `cardId` and `labelId` fields
#### Scenario: Get board includes card memberships
- **WHEN** `GetBoard` is called and cards on the board have members assigned
- **THEN** the returned Board SHALL contain a `CardMemberships` slice with all card-membership associations
#### Scenario: List board actions
- **WHEN** `ListBoardActions` is called with a board ID and limit