Skip to content

Comments

feat: add purge command to delete closed tickets#6

Merged
kostyay merged 2 commits intomainfrom
feat/purge-command
Jan 12, 2026
Merged

feat: add purge command to delete closed tickets#6
kostyay merged 2 commits intomainfrom
feat/purge-command

Conversation

@kostyay
Copy link
Owner

@kostyay kostyay commented Jan 12, 2026

Summary

  • Add kt purge command to permanently delete all closed tickets
  • Interactive confirmation shows ticket list, prompts for y/N
  • Reference validation blocks purge if open tickets depend on closed ones
  • Comprehensive test coverage (11 tests)

Test plan

  • All tests pass (go test ./...)
  • Manual testing confirms interactive prompt works
  • Reference blocking works for parent/deps/links
  • User cancellation works
  • JSON mode properly errors

🤖 Generated with Claude Code

kostyay and others added 2 commits January 12, 2026 23:07
Add kt purge command that permanently deletes all closed tickets
with interactive confirmation and reference validation.

Features:
- Lists all closed tickets before deletion
- Interactive confirmation prompt (y/N)
- Validates no open tickets reference closed ones (parent/deps/links)
- Blocks purge in JSON mode (requires interactive)
- Comprehensive test suite with 11 test cases

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Remove unnecessary comments (code is self-documenting)
- Extract mockStdin helper to reduce test boilerplate
- Convert TestPromptConfirmation to table-driven test
- Use len(closedTickets) instead of tracking deleted counter

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@kostyay kostyay merged commit 184ec20 into main Jan 12, 2026
3 checks passed
@kostyay kostyay deleted the feat/purge-command branch January 12, 2026 22:13
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