Skip to content

Commit 67bef16

Browse files
committed
Phase 7: Port bbs2gh migrate-repo command
Port the bbs2gh migrate-repo command from C# to Go with full feature parity: - 5-phase handler: preflight checks, generate archive (BBS export + poll), download archive (SSH/SMB), upload archive (Azure/AWS/GitHub storage), import archive (start migration + poll) - Consumer-defined interfaces for all external dependencies (GitHub API, BBS API, archive downloader/uploader, filesystem, env provider) - Two-constructor pattern: newMigrateRepoCmd (testable) + newMigrateRepoCmdLive (production wiring with real SSH/SMB downloaders, Azure/AWS uploaders) - Comprehensive validation matching C# MigrateRepoCommandArgs: source mutual exclusion, SSH/SMB bidirectional pairing, AWS credential checks, storage conflict detection, archive-path existence, bbs-shared-home check - 35+ tests ported from C# MigrateRepoCommandHandlerTests and MigrateRepoCommandArgsTests - awsLogAdapter bridges logger.Logger.Info -> awsStorage.ProgressLogger.LogInfo - Added env.SmbPassword() and filesystem.OpenRead()/DeleteIfExists() helpers - 0 lint issues (gocyclo fixed via helper extraction)
1 parent 418b92a commit 67bef16

5 files changed

Lines changed: 2812 additions & 1 deletion

File tree

cmd/bbs2gh/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func newRootCmd() *cobra.Command {
5353
rootCmd.Version = version
5454

5555
// Add commands (will be implemented in phases)
56-
// rootCmd.AddCommand(newMigrateRepoCmd())
56+
rootCmd.AddCommand(newMigrateRepoCmdLive())
5757
// rootCmd.AddCommand(newGenerateScriptCmd())
5858
// rootCmd.AddCommand(newInventoryReportCmd())
5959
// rootCmd.AddCommand(newMigrateCodeScanningAlertsCmd())

0 commit comments

Comments
 (0)