feat: Add batch deletion support (bd-127)
- Add DeleteIssues() method in sqlite.go for atomic batch deletion - Support multiple issue IDs as arguments or from file - Add --from-file flag to read IDs from file (supports comments) - Add --dry-run mode for safe preview without deleting - Add --cascade flag for recursive deletion of dependents - Add --force flag to orphan dependents instead of failing - Pre-collect connected issues before deletion for text reference updates - Add orphan deduplication to prevent duplicate IDs - Add rows.Err() checks in all row iteration loops - Full transaction safety - all deletions succeed or none do - Comprehensive statistics tracking (deleted, dependencies, labels, events) - Update README and CHANGELOG with batch deletion docs Fixed critical code review issues: - Dry-run mode now properly uses dryRun parameter instead of deleting data - Text references are pre-collected before deletion so they update correctly - Added orphan deduplication and error checks - Updated defer rollback pattern per Go best practices
This commit is contained in:
10
CHANGELOG.md
10
CHANGELOG.md
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
- **Batch Deletion**: Enhanced `bd delete` command with batch operations (bd-127)
|
||||
- Delete multiple issues at once: `bd delete bd-1 bd-2 bd-3 --force`
|
||||
- Read from file: `bd delete --from-file deletions.txt --force`
|
||||
- Dry-run mode: `--dry-run` to preview deletions before execution
|
||||
- Cascade mode: `--cascade` to recursively delete all dependents
|
||||
- Force mode: `--force` to orphan dependents instead of failing
|
||||
- Atomic transactions: all deletions succeed or none do
|
||||
- Comprehensive statistics: tracks deleted issues, dependencies, labels, and events
|
||||
|
||||
## [0.9.9] - 2025-10-17
|
||||
|
||||
### Added
|
||||
|
||||
Reference in New Issue
Block a user