diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 8b1378917..66783cf71 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1 +1 @@ - +- The `--target-uploads-url` and `--use-github-storage` options are now visible in `--help` output for the `migrate-repo`, `migrate-org`, and `generate-script` commands (where applicable) in the gei, bbs2gh, and gl2gh extensions. diff --git a/src/OctoshiftCLI.Tests/bbs2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs b/src/OctoshiftCLI.Tests/bbs2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs index 236e292cd..afffb3484 100644 --- a/src/OctoshiftCLI.Tests/bbs2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs +++ b/src/OctoshiftCLI.Tests/bbs2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs @@ -36,7 +36,7 @@ public void Should_Have_Options() { _command.Should().NotBeNull(); _command.Name.Should().Be("generate-script"); - _command.Options.Count.Should().Be(21); + _command.Options.Count.Should().Be(22); TestHelpers.VerifyCommandOption(_command.Options, "bbs-server-url", true); TestHelpers.VerifyCommandOption(_command.Options, "github-org", true); @@ -58,7 +58,8 @@ 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); + TestHelpers.VerifyCommandOption(_command.Options, "target-uploads-url", false); + TestHelpers.VerifyCommandOption(_command.Options, "use-github-storage", false); } [Fact] diff --git a/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs b/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs index 625130223..5d163d61c 100644 --- a/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs +++ b/src/OctoshiftCLI.Tests/bbs2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs @@ -90,8 +90,8 @@ 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, "target-uploads-url", false, true); - TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false, true); + TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false); } [Fact] diff --git a/src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandTests.cs b/src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandTests.cs index b2eb3f2d9..dd8a482f4 100644 --- a/src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandTests.cs @@ -56,8 +56,8 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(command.Options, "aws-region", false); TestHelpers.VerifyCommandOption(command.Options, "keep-archive", false); TestHelpers.VerifyCommandOption(command.Options, "target-api-url", false); - TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false, true); - TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false, true); + TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false); } [Fact] diff --git a/src/OctoshiftCLI.Tests/gei/Commands/MigrateOrg/MigrateOrgCommandTests.cs b/src/OctoshiftCLI.Tests/gei/Commands/MigrateOrg/MigrateOrgCommandTests.cs index 2c6e3beb9..846c8da9a 100644 --- a/src/OctoshiftCLI.Tests/gei/Commands/MigrateOrg/MigrateOrgCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gei/Commands/MigrateOrg/MigrateOrgCommandTests.cs @@ -46,7 +46,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(command.Options, "github-target-pat", false); TestHelpers.VerifyCommandOption(command.Options, "verbose", false); TestHelpers.VerifyCommandOption(command.Options, "target-api-url", false); - TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false, true); + TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false); } [Fact] diff --git a/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs b/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs index 26d039592..e728de3e4 100644 --- a/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs @@ -20,7 +20,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(command.Options, "github-target-org", true); TestHelpers.VerifyCommandOption(command.Options, "target-repo", false); TestHelpers.VerifyCommandOption(command.Options, "target-api-url", false); - TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false, true); + TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false); TestHelpers.VerifyCommandOption(command.Options, "ghes-api-url", false); TestHelpers.VerifyCommandOption(command.Options, "azure-storage-connection-string", false); TestHelpers.VerifyCommandOption(command.Options, "aws-bucket-name", false); @@ -40,7 +40,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); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false); } } } diff --git a/src/OctoshiftCLI.Tests/gl2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs b/src/OctoshiftCLI.Tests/gl2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs index 7bc9901b3..1f7da6e94 100644 --- a/src/OctoshiftCLI.Tests/gl2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gl2gh/Commands/GenerateScript/GenerateScriptCommandTests.cs @@ -42,7 +42,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(_command.Options, "gitlab-server-url", true); TestHelpers.VerifyCommandOption(_command.Options, "github-org", true); TestHelpers.VerifyCommandOption(_command.Options, "target-api-url", false); - TestHelpers.VerifyCommandOption(_command.Options, "target-uploads-url", false, true); + TestHelpers.VerifyCommandOption(_command.Options, "target-uploads-url", false); TestHelpers.VerifyCommandOption(_command.Options, "gitlab-pat", false); TestHelpers.VerifyCommandOption(_command.Options, "gitlab-group", false); TestHelpers.VerifyCommandOption(_command.Options, "gitlab-project", false); @@ -52,7 +52,7 @@ public void Should_Have_Options() TestHelpers.VerifyCommandOption(_command.Options, "aws-region", false); TestHelpers.VerifyCommandOption(_command.Options, "keep-archive", false); TestHelpers.VerifyCommandOption(_command.Options, "no-ssl-verify", false); - TestHelpers.VerifyCommandOption(_command.Options, "use-github-storage", false, true); + TestHelpers.VerifyCommandOption(_command.Options, "use-github-storage", false); } [Fact] diff --git a/src/OctoshiftCLI.Tests/gl2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs b/src/OctoshiftCLI.Tests/gl2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs index ee8856a7e..6774378bc 100644 --- a/src/OctoshiftCLI.Tests/gl2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs +++ b/src/OctoshiftCLI.Tests/gl2gh/Commands/MigrateRepo/MigrateRepoCommandTests.cs @@ -76,8 +76,8 @@ 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, "target-uploads-url", false, true); - TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false, true); + TestHelpers.VerifyCommandOption(command.Options, "target-uploads-url", false); + TestHelpers.VerifyCommandOption(command.Options, "use-github-storage", false); } [Fact] diff --git a/src/bbs2gh/Commands/GenerateScript/GenerateScriptCommand.cs b/src/bbs2gh/Commands/GenerateScript/GenerateScriptCommand.cs index d3af5da54..95bb18f9c 100644 --- a/src/bbs2gh/Commands/GenerateScript/GenerateScriptCommand.cs +++ b/src/bbs2gh/Commands/GenerateScript/GenerateScriptCommand.cs @@ -18,6 +18,7 @@ public GenerateScriptCommand() : base( AddOption(BbsServerUrl); AddOption(GithubOrg); AddOption(TargetApiUrl); + AddOption(TargetUploadsUrl); AddOption(BbsUsername); AddOption(BbsPassword); AddOption(BbsProject); @@ -125,9 +126,12 @@ public GenerateScriptCommand() : base( Description = "The URL of the target API, if not migrating to github.com. Defaults to https://api.github.com" }; + public Option TargetUploadsUrl { get; } = new( + name: "--target-uploads-url", + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); + public Option UseGithubStorage { get; } = new("--use-github-storage") { - IsHidden = true, Description = "Enables multipart uploads to a GitHub owned storage for use during migration. " + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).", }; diff --git a/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs index c93b5eaa9..6b097af9f 100644 --- a/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -193,8 +193,7 @@ public MigrateRepoCommand() : base( }; public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); public Option NoSslVerify { get; } = new( 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. " + @@ -202,8 +201,7 @@ public MigrateRepoCommand() : base( public Option UseGithubStorage { get; } = new( name: "--use-github-storage", description: "Enables multipart uploads to a GitHub owned storage for use during migration. " + - "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).") - { IsHidden = true }; + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB)."); public override MigrateRepoCommandHandler BuildHandler(MigrateRepoCommandArgs args, IServiceProvider sp) { diff --git a/src/gei/Commands/GenerateScript/GenerateScriptCommand.cs b/src/gei/Commands/GenerateScript/GenerateScriptCommand.cs index d0e273948..3021f17b4 100644 --- a/src/gei/Commands/GenerateScript/GenerateScriptCommand.cs +++ b/src/gei/Commands/GenerateScript/GenerateScriptCommand.cs @@ -103,11 +103,9 @@ public GenerateScriptCommand() : base( }; public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); public Option UseGithubStorage { get; } = new("--use-github-storage") { - IsHidden = true, Description = "Enables multipart uploads to a GitHub owned storage for use during migration. " + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).", }; diff --git a/src/gei/Commands/MigrateOrg/MigrateOrgCommand.cs b/src/gei/Commands/MigrateOrg/MigrateOrgCommand.cs index 6f06d42b5..4738d2b42 100644 --- a/src/gei/Commands/MigrateOrg/MigrateOrgCommand.cs +++ b/src/gei/Commands/MigrateOrg/MigrateOrgCommand.cs @@ -48,8 +48,7 @@ public MigrateOrgCommand() : base( }; public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); public Option QueueOnly { get; } = new("--queue-only") { Description = "Only queues the migration, does not wait for it to finish. Use the wait-for-migration command to subsequently wait for it to finish and view the status." diff --git a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs index eee3e39a3..1fbdd004e 100644 --- a/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -69,8 +69,7 @@ public MigrateRepoCommand() : base( }; public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); // GHES migration path public Option GhesApiUrl { get; } = new("--ghes-api-url") @@ -108,7 +107,6 @@ public MigrateRepoCommand() : base( }; public Option UseGithubStorage { get; } = new("--use-github-storage") { - IsHidden = true, Description = "Enables multipart uploads to a GitHub owned storage for use during migration. " + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).", }; diff --git a/src/gl2gh/Commands/GenerateScript/GenerateScriptCommand.cs b/src/gl2gh/Commands/GenerateScript/GenerateScriptCommand.cs index e18afacae..bee2cbb47 100644 --- a/src/gl2gh/Commands/GenerateScript/GenerateScriptCommand.cs +++ b/src/gl2gh/Commands/GenerateScript/GenerateScriptCommand.cs @@ -79,8 +79,7 @@ public GenerateScriptCommand() : base( public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); public Option NoSslVerify { get; } = new( name: "--no-ssl-verify", @@ -89,7 +88,6 @@ public GenerateScriptCommand() : base( public Option UseGithubStorage { get; } = new("--use-github-storage") { - IsHidden = true, Description = "Enables multipart uploads to a GitHub owned storage for use during migration. " + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).", }; diff --git a/src/gl2gh/Commands/MigrateRepo/MigrateRepoCommand.cs b/src/gl2gh/Commands/MigrateRepo/MigrateRepoCommand.cs index db6d93b66..398ceb5a7 100644 --- a/src/gl2gh/Commands/MigrateRepo/MigrateRepoCommand.cs +++ b/src/gl2gh/Commands/MigrateRepo/MigrateRepoCommand.cs @@ -120,8 +120,7 @@ public MigrateRepoCommand() : base( }; public Option TargetUploadsUrl { get; } = new( name: "--target-uploads-url", - description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com") - { IsHidden = true }; + description: "The URL of the target uploads API, if not migrating to github.com. Defaults to https://uploads.github.com"); public Option NoSslVerify { get; } = new( name: "--no-ssl-verify", description: "Disables SSL verification when communicating with your GitLab instance. All other migration steps will continue to verify SSL. " + @@ -129,8 +128,7 @@ public MigrateRepoCommand() : base( public Option UseGithubStorage { get; } = new( name: "--use-github-storage", description: "Enables multipart uploads to a GitHub owned storage for use during migration. " + - "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB).") - { IsHidden = true }; + "Configure chunk size with the GITHUB_OWNED_STORAGE_MULTIPART_MEBIBYTES environment variable (default: 100 MiB, minimum: 5 MiB)."); public override MigrateRepoCommandHandler BuildHandler(MigrateRepoCommandArgs args, IServiceProvider sp) {