Skip to content

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

Merged
tupe12334 merged 1 commit into
mainfrom
claude/issue-111-get-issue-without-get-20260224-150407
Oct 19, 2026
Merged

tupe12334 merged 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

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tupe12334
tupe12334 force-pushed the claude/issue-111-get-issue-without-get-20260224-150407 branch from 0c91a9f to 3f79d8d Compare October 19, 2026 20:04
@tupe12334

Copy link
Copy Markdown
Member Author

Live check (parent session) on 3f79d8d against the running daemon 0.15.1, project centy-daemon:

@tupe12334

Copy link
Copy Markdown
Member Author

Independent review (separate agent):

Findings:

  • src/commands/issue.ts:1-94 matches src/commands/get.ts line for line, except itemType is the constant 'issues' instead of pluralize(args.type). The same flags (--json, -g/--global, --project), the same --global path via handleGlobalGet, the same ensureInitialized/NotInitializedError handling, the same display-number-or-UUID logic via parseDisplayNumber, and the same !response.success error path and JSON/formatted output. No behavior drift.
  • src/commands/issue.ts:38,49: the flags and description are right. Only the arg description is narrower than get ("Issue ID (UUID or display number)"), which is correct because slugs apply to docs, not issues.
  • src/commands/issue.spec.ts:1-289 covers display number, UUID, fixed issues type, --json, --global by UUID and by display number, daemon failure, NotInitializedError, --project, and the single id arg. Gap, not a defect: there is no test that --global skips ensureInitialized.
  • oclif.manifest.json: I compared the parsed JSON of main and the PR head. The only added command is issue. No commands were removed or changed. The version field moves from 0.8.4 to 0.8.5, which matches package.json on main (the manifest was stale). The large diff comes from key reordering (daemon:*, delete:asset, get:*, org:*, list:*), not content changes.
  • Nothing here changes get, show or any other command. The new top-level issue topic does not collide with an existing command or topic in src/commands. All CI checks pass (build, lint, format, knip, spell, test on ubuntu and windows, Node 20 and 22).

Verdict: approve

@tupe12334
tupe12334 merged commit b05a377 into main Oct 19, 2026
10 checks passed
@tupe12334 tupe12334 mentioned this pull request Oct 19, 2026
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