Skip to content

Integrate name resolution into commands - #13

Merged
jeremy merged 1 commit into
mainfrom
names-command-integration
Jan 22, 2026
Merged

jeremy merged 1 commit into
mainfrom
names-command-integration

Conversation

@jeremy

@jeremy jeremy commented Jan 22, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Refactors todos.sh and todolists.sh commands to use the centralized name resolution from lib/names.sh (introduced in Add names module for human-readable name resolution #12)
  • Enables users to specify projects and todolists by name instead of numeric IDs
  • Removes ~78 lines of duplicated resolution boilerplate

Example Usage

# Use project name instead of ID
bcq todos --in "My Project"

# Use both project and todolist names
bcq todo "New task" --list "Sprint 42" --in "Acme Corp"

# Works for todolist groups too
bcq todolistgroups --list "Backlog" --in "Engineering"

Files Changed

  • lib/commands/todos.sh - All functions now use require_project_id()
  • lib/commands/todolists.sh - Uses require_project_id() and require_todolist_id()
  • lib/commands/people.sh - resolve_assignee() delegates to resolve_person_id()

Test plan

  • All 374 existing tests pass
  • Manual testing with name-based project resolution
  • Manual testing with name-based todolist resolution

Replace inline project/todolist resolution boilerplate with centralized
require_project_id() and require_todolist_id() functions from lib/names.sh.

Changes:
- todos.sh: All functions now use require_project_id() for consistent
  name-to-ID resolution and error handling
- todolists.sh: All functions use require_project_id(), and group
  commands also use require_todolist_id() for todolist resolution
- people.sh: resolve_assignee() now delegates to resolve_person_id()

This enables users to specify projects and todolists by name instead of
requiring numeric IDs:

    bcq todos --in "My Project"
    bcq todo "New task" --list "Sprint 42" --in "Acme Corp"
    bcq todolistgroups --list "Backlog" --in "Engineering"

Removes ~78 lines of duplicated resolution boilerplate.
@jeremy
jeremy merged commit 08f12db into main Jan 22, 2026
2 checks passed
@jeremy
jeremy deleted the names-command-integration branch January 22, 2026 08:46
jeremy added a commit that referenced this pull request Feb 19, 2026
Replace inline project/todolist resolution boilerplate with centralized
require_project_id() and require_todolist_id() functions from lib/names.sh.

Changes:
- todos.sh: All functions now use require_project_id() for consistent
  name-to-ID resolution and error handling
- todolists.sh: All functions use require_project_id(), and group
  commands also use require_todolist_id() for todolist resolution
- people.sh: resolve_assignee() now delegates to resolve_person_id()

This enables users to specify projects and todolists by name instead of
requiring numeric IDs:

    bcq todos --in "My Project"
    bcq todo "New task" --list "Sprint 42" --in "Acme Corp"
    bcq todolistgroups --list "Backlog" --in "Engineering"

Removes ~78 lines of duplicated resolution boilerplate.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant