Skip to content

feat: add centy issue <id> shortcut alias for get issue#52

Open
tupe12334 wants to merge 1 commit into
mainfrom
claude/issue-111-get-issue-without-get-20260224-150407
Open

feat: add centy issue <id> shortcut alias for get issue#52
tupe12334 wants to merge 1 commit into
mainfrom
claude/issue-111-get-issue-without-get-20260224-150407

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Summary

  • Adds a top-level issue command so users can run centy issue <id> directly without typing the get subcommand (closes issue #111)
  • The new command has full flag parity with get issue: --json, --global, and --project
  • Includes 10 unit tests covering all lookup paths (display number, UUID, global search), JSON output, error handling, NotInitializedError, and the --project flag

Motivation

Issue #111 requested a shorter way to retrieve a single issue. Previously users had to type centy get issue <id> or centy show issue <id>. The new centy issue <id> shortcut removes the need for the intermediate subcommand entirely.

Changes

  • src/commands/issue.ts - New command class delegating to the same daemonGetItem / handleGlobalGet helpers used by get issue
  • src/commands/issue.spec.ts - 10 vitest unit tests
  • oclif.manifest.json - Regenerated to register the new issue command

Test plan

  • centy issue <display-number> returns the correct issue
  • centy issue <uuid> returns the correct issue
  • centy issue <id> --json outputs raw JSON
  • centy issue <id> --global searches across all tracked projects
  • centy issue <id> --project <name> resolves the specified project path
  • All 10 unit tests pass (pnpm test src/commands/issue.spec.ts)
  • centy issue --help shows the command description and examples

🤖 Generated with Claude Code

Implements issue #111 by adding a top-level `issue` command that acts
as a direct alias for `get issue`. Users can now run:

  centy issue <uuid>
  centy issue <display-number>
  centy issue <id> --json
  centy issue <id> --global
  centy issue <id> --project <name>

This mirrors the same behaviour as `centy get issue <id>` without
requiring the `get` subcommand to be typed.

- Add src/commands/issue.ts with full flag parity (--json, --global,
  --project)
- Add src/commands/issue.spec.ts with 10 unit tests covering display
  number lookup, UUID lookup, JSON output, global search (UUID and
  display number), error handling, NotInitializedError, --project flag,
  and args shape validation
- Regenerate oclif.manifest.json to register the new command

Closes #111

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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