Skip to content

Integrate require_project_id across all remaining commands - #14

Merged
jeremy merged 3 commits into
mainfrom
names-ubiquitous
Jan 22, 2026
Merged

jeremy merged 3 commits into
mainfrom
names-ubiquitous

Conversation

@jeremy

@jeremy jeremy commented Jan 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Add optional custom hint parameter to require_project_id() for context-specific error guidance
  • Replace inline project resolution boilerplate with centralized require_project_id() calls across all command files
  • Update tests to match uniform error messages

This completes the ubiquitous name resolution work started in #12 and #13.

Commands updated

assign, campfire, cards, checkins, comment, events, files, forwards, messageboards, messages, messagetypes, people, recordings, schedule, show, subscriptions, timesheet, todosets, webhooks

Benefits

  • Uniform: All commands now resolve project names the same way
  • Predictable: Consistent error messages with context-specific hints where needed
  • Maintainable: -434 lines of duplicated boilerplate removed

Test plan

  • All 374 tests pass
  • campfire list error mentions --all alternative
  • Other commands show standard --in <project> hint

Allow callers to provide context-specific error guidance when
project resolution fails. Commands like `campfire list` can now
mention `--all` as an alternative, while other commands use
the default hint.
Replace inline project resolution boilerplate with centralized
require_project_id() calls throughout the codebase. This provides:

- Uniform name-to-ID resolution for project arguments
- Consistent config fallback behavior
- Predictable error messages across all commands

Commands updated: assign, campfire, cards, checkins, comment,
events, files, forwards, messageboards, messages, messagetypes,
people, recordings, schedule, show, subscriptions, timesheet,
todosets, webhooks.

The campfire list command uses a custom hint to mention --all
as an alternative to specifying a project.
Adjust test assertion to match the standardized "No project
specified" error message from require_project_id.
@jeremy
jeremy merged commit f95c23a into main Jan 22, 2026
2 checks passed
@jeremy
jeremy deleted the names-ubiquitous branch January 22, 2026 17:49
jeremy added a commit that referenced this pull request Feb 19, 2026
* Add custom hint parameter to require_project_id

Allow callers to provide context-specific error guidance when
project resolution fails. Commands like `campfire list` can now
mention `--all` as an alternative, while other commands use
the default hint.

* Integrate require_project_id across all commands

Replace inline project resolution boilerplate with centralized
require_project_id() calls throughout the codebase. This provides:

- Uniform name-to-ID resolution for project arguments
- Consistent config fallback behavior
- Predictable error messages across all commands

Commands updated: assign, campfire, cards, checkins, comment,
events, files, forwards, messageboards, messages, messagetypes,
people, recordings, schedule, show, subscriptions, timesheet,
todosets, webhooks.

The campfire list command uses a custom hint to mention --all
as an alternative to specifying a project.

* Update timesheet test for uniform error message

Adjust test assertion to match the standardized "No project
specified" error message from require_project_id.
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