Implement: US: Manage Trello Boards #6

Merged
crisleo94 merged 2 commits from feature/manage-boards into main 2026-05-26 22:59:11 +00:00
Owner

Implemented: Trello Board Management

Changes

  • 5 board tools in src/trello_plugin/tools.py:
    • trello_create_board — create a new board
    • trello_rename_board — rename an existing board
    • trello_archive_board — close/archive a board
    • trello_open_board — re-open a closed board
    • trello_board_details — view board with lists and members
  • Board CRUD methods on TrelloClient with name-to-ID resolution
  • 16 new tests in tests/test_boards.py — all 34 tests pass
  • Spec document in docs/backend/manage-boards-spec.md

This branch is based on feature/trello-auth and includes the auth client. The diff shows only board-specific changes.

Acceptance Criteria Covered

  • 2.1: Create a new Trello board
  • 2.2: Rename an existing Trello board
  • 2.3: Close/archive a Trello board
  • 2.4: Open a closed Trello board
  • 2.5: View details of a Trello board (lists, members, URL)

Closes #2

## Implemented: Trello Board Management ### Changes - **5 board tools** in `src/trello_plugin/tools.py`: - `trello_create_board` — create a new board - `trello_rename_board` — rename an existing board - `trello_archive_board` — close/archive a board - `trello_open_board` — re-open a closed board - `trello_board_details` — view board with lists and members - **Board CRUD methods** on `TrelloClient` with name-to-ID resolution - **16 new tests** in `tests/test_boards.py` — all 34 tests pass - **Spec document** in `docs/backend/manage-boards-spec.md` This branch is based on `feature/trello-auth` and includes the auth client. The diff shows only board-specific changes. ### Acceptance Criteria Covered - ✅ 2.1: Create a new Trello board - ✅ 2.2: Rename an existing Trello board - ✅ 2.3: Close/archive a Trello board - ✅ 2.4: Open a closed Trello board - ✅ 2.5: View details of a Trello board (lists, members, URL) Closes #2
marko added 3 commits 2026-05-26 22:29:05 +00:00
Add TrelloClient for Trello REST API interaction with env-var-based
credential management (TRELLO_API_KEY, TRELLO_TOKEN).

Implements:
- trello_verify_credentials — verify API key/token against Trello API
- trello_list_boards — list accessible Trello boards
- trello_disconnect — clear in-memory credentials

Includes full test suite (18 tests), spec document, and plugin metadata.

Issue: #1
- Add class-level type annotations on TrelloClient (api_key, token, _session)
- Add TypedDict response contracts with TypeGuard narrowing for _request
- Replace os.environ manipulation with monkeypatch in tests
- Align disconnect message with auto-reconnect behavior
- Add docstring for TRELLO_API_BASE constant
- Add _post and _put request helpers for future endpoints
Add 5 board management tools extending the Trello client:
- trello_create_board — create a new board
- trello_rename_board — rename an existing board
- trello_archive_board — close/archive a board
- trello_open_board — re-open a closed board
- trello_board_details — view board with lists and members

Includes board name-to-ID resolution, 16 new tests, and spec doc.

Issue: #2
Owner

Reid's Review — PR #6 on HermesFactory/trello-plugin

Verdict: Approved — No blocking issues found


📋 AC Coverage

Based on linked issue #2

  • 2.1 Create a new Trello board — create_board() method with name+default_lists parameters
  • 2.2 Rename an existing Trello board — rename_board() with board_id+name parameters
  • 2.3 Close/archive a Trello board — archive_board() method implemented
  • 2.4 Open a closed Trello board — open_board() method implemented
  • 2.5 View details of a Trello board — board_details() returns lists, members, URL

🔍 Code Quality Notes

The code addresses the issues from PR #5 review:

  • Class-level type hints (api_key: str, token: str, _session: requests.Session) are now properly declared
  • TypedDict response contracts (SuccessResponse, ErrorResponse) with TypeGuard helper _is_success() used correctly
  • Test fixtures use monkeypatch properly instead of manual os.environ manipulation
  • All methods have comprehensive docstrings
  • Good error handling with descriptive messages

No blocking issues. Code follows Python 3.10+ best practices with modern type hints.

## Reid's Review — PR #6 on HermesFactory/trello-plugin **Verdict:** ✅ Approved — No blocking issues found --- ### 📋 AC Coverage > Based on linked issue #2 - [x] **2.1** Create a new Trello board — `create_board()` method with name+default_lists parameters - [x] **2.2** Rename an existing Trello board — `rename_board()` with board_id+name parameters - [x] **2.3** Close/archive a Trello board — `archive_board()` method implemented - [x] **2.4** Open a closed Trello board — `open_board()` method implemented - [x] **2.5** View details of a Trello board — `board_details()` returns lists, members, URL --- ### 🔍 Code Quality Notes The code addresses the issues from PR #5 review: - Class-level type hints (`api_key: str`, `token: str`, `_session: requests.Session`) are now properly declared - TypedDict response contracts (`SuccessResponse`, `ErrorResponse`) with `TypeGuard` helper `_is_success()` used correctly - Test fixtures use `monkeypatch` properly instead of manual os.environ manipulation - All methods have comprehensive docstrings - Good error handling with descriptive messages No blocking issues. Code follows Python 3.10+ best practices with modern type hints.
crisleo94 approved these changes 2026-05-26 22:56:33 +00:00
crisleo94 added 1 commit 2026-05-26 22:59:05 +00:00
crisleo94 merged commit 9496ef45ea into main 2026-05-26 22:59:11 +00:00
Sign in to join this conversation.
No Reviewers
No labels
3 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: HermesFactory/trello-plugin#6