Consolidate CLI commands to reduce top-level surface area
- migrate-* commands → subcommands of `bd migrate` - relate/unrelate → subcommands of `bd dep` - daemons subcommands → available under `bd daemon` - comment alias → hidden with deprecation warning All old commands still work with deprecation warnings for backwards compatibility. Reduces visible top-level commands from ~73 to 66. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -14,8 +14,7 @@ import (
|
||||
|
||||
// TODO: Consider integrating into 'bd doctor' migration detection
|
||||
var migrateIssuesCmd = &cobra.Command{
|
||||
Use: "migrate-issues",
|
||||
GroupID: "maint",
|
||||
Use: "issues",
|
||||
Short: "Move issues between repositories",
|
||||
Long: `Move issues from one source repository to another with filtering and dependency preservation.
|
||||
|
||||
@@ -692,7 +691,7 @@ func loadIDsFromFile(path string) ([]string, error) {
|
||||
}
|
||||
|
||||
func init() {
|
||||
rootCmd.AddCommand(migrateIssuesCmd)
|
||||
migrateCmd.AddCommand(migrateIssuesCmd)
|
||||
|
||||
migrateIssuesCmd.Flags().String("from", "", "Source repository (required)")
|
||||
migrateIssuesCmd.Flags().String("to", "", "Destination repository (required)")
|
||||
@@ -710,4 +709,11 @@ func init() {
|
||||
|
||||
_ = migrateIssuesCmd.MarkFlagRequired("from") // Only fails if flag missing (caught in tests)
|
||||
_ = migrateIssuesCmd.MarkFlagRequired("to") // Only fails if flag missing (caught in tests)
|
||||
|
||||
// Backwards compatibility alias at root level (hidden)
|
||||
migrateIssuesAliasCmd := *migrateIssuesCmd
|
||||
migrateIssuesAliasCmd.Use = "migrate-issues"
|
||||
migrateIssuesAliasCmd.Hidden = true
|
||||
migrateIssuesAliasCmd.Deprecated = "use 'bd migrate issues' instead"
|
||||
rootCmd.AddCommand(&migrateIssuesAliasCmd)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user