Commit 67bef16
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
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
0 commit comments