diff --git a/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs b/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs index c20c5e5fc..a0356e975 100644 --- a/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs +++ b/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs @@ -56,7 +56,7 @@ public void Should_Have_Options() var command = new MigrateRepoCommand(); command.Should().NotBeNull(); command.Name.Should().Be("migrate-repo"); - command.Options.Count.Should().Be(31); + command.Options.Count.Should().Be(32); TestHelpers.VerifyCommandOption(command.Options, "bbs-server-url", true); TestHelpers.VerifyCommandOption(command.Options, "bbs-project", true); @@ -88,6 +88,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(command.Options, "keep-archive", false); TestHelpers.VerifyCommandOption(command.Options, "no-ssl-verify", false); TestHelpers.VerifyCommandOption(command.Options, "target-api-url", false); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false, true); } [Fact] diff --git a/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs b/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs index 6b12b83ec..df42dc8b9 100644 --- a/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs @@ -13,7 +13,7 @@ public void Should_Have_Options() command.Should().NotBeNull(); command.Name.Should().Be("migrate-repo"); - command.Options.Count.Should().Be(23); + command.Options.Count.Should().Be(24); TestHelpers.VerifyCommandOption(command.Options, "github-source-org", true); TestHelpers.VerifyCommandOption(command.Options, "source-repo", true); @@ -37,6 +37,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(command.Options, "github-target-pat", false); TestHelpers.VerifyCommandOption(command.Options, "verbose", false); TestHelpers.VerifyCommandOption(command.Options, "keep-archive", false); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false, true); } } } diff --git a/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs index 6128de774..e499a0f03 100644 --- a/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -48,6 +48,7 @@ public MigrateRepoCommand() : base( AddOption(KeepArchive); AddOption(NoSslVerify); AddOption(TargetApiUrl); + AddOption(UseGithubStorage); } public Option BbsServerUrl { get; } = new( @@ -191,6 +192,10 @@ public MigrateRepoCommand() : base( name: "--no-ssl-verify", description: "Disables SSL verification when communicating with your Bitbucket Server/Data Center instance. All other migration steps will continue to verify SSL. " + "If your Bitbucket instance has a self-signed SSL certificate then setting this flag will allow the migration archive to be exported."); + public Option UseGithubStorage { get; } = new( + name: "--use-github-storage", + description: "Enables multipart uploads to a GitHub owned storage for use during migration") + { IsHidden = true }; public override MigrateRepoCommandHandler BuildHandler(MigrateRepoCommandArgs args, IServiceProvider sp) { diff --git a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs index 3719f156a..1009c37b7 100644 --- a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -43,6 +43,7 @@ public MigrateRepoCommand() : base( AddOption(GithubTargetPat); AddOption(Verbose); AddOption(KeepArchive); + AddOption(UseGithubStorage); } public Option GithubSourceOrg { get; } = new("--github-source-org") @@ -102,6 +103,11 @@ public MigrateRepoCommand() : base( { Description = "Only effective if migrating from GHES. Disables SSL verification when communicating with your GHES instance. All other migration steps will continue to verify SSL. If your GHES instance has a self-signed SSL certificate then setting this flag will allow data to be extracted." }; + public Option UseGithubStorage { get; } = new("--use-github-storage") + { + IsHidden = true, + Description = "Enables multipart uploads to a GitHub owned storage for use during migration", + }; // Pre-uploaded archive urls, hidden by default public Option GitArchiveUrl { get; } = new("--git-archive-url")