Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion RELEASENOTES.md
Original file line number Diff line number Diff line change
@@ -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.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down
6 changes: 5 additions & 1 deletion src/bbs2gh/Commands/GenerateScript/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ public GenerateScriptCommand() : base(
AddOption(BbsServerUrl);
AddOption(GithubOrg);
AddOption(TargetApiUrl);
AddOption(TargetUploadsUrl);
AddOption(BbsUsername);
AddOption(BbsPassword);
AddOption(BbsProject);
Expand Down Expand Up @@ -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<string> 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<bool> 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).",
};
Expand Down
6 changes: 2 additions & 4 deletions src/bbs2gh/Commands/MigrateRepo/MigrateRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,15 @@ public MigrateRepoCommand() : base(
};
public Option<string> 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<bool> 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. " +
"If your Bitbucket instance has a self-signed SSL certificate then setting this flag will allow the migration archive to be exported.");
public Option<bool> 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)
{
Expand Down
4 changes: 1 addition & 3 deletions src/gei/Commands/GenerateScript/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,9 @@ public GenerateScriptCommand() : base(
};
public Option<string> 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<bool> 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).",
};
Expand Down
3 changes: 1 addition & 2 deletions src/gei/Commands/MigrateOrg/MigrateOrgCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ public MigrateOrgCommand() : base(
};
public Option<string> 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<bool> 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."
Expand Down
4 changes: 1 addition & 3 deletions src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ public MigrateRepoCommand() : base(
};
public Option<string> 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<string> GhesApiUrl { get; } = new("--ghes-api-url")
Expand Down Expand Up @@ -108,7 +107,6 @@ public MigrateRepoCommand() : base(
};
public Option<bool> 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).",
};
Expand Down
4 changes: 1 addition & 3 deletions src/gl2gh/Commands/GenerateScript/GenerateScriptCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,7 @@ public GenerateScriptCommand() : base(

public Option<string> 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<bool> NoSslVerify { get; } = new(
name: "--no-ssl-verify",
Expand All @@ -89,7 +88,6 @@ public GenerateScriptCommand() : base(

public Option<bool> 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).",
};
Expand Down
6 changes: 2 additions & 4 deletions src/gl2gh/Commands/MigrateRepo/MigrateRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,15 @@ public MigrateRepoCommand() : base(
};
public Option<string> 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<bool> 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. " +
"If your GitLab instance has a self-signed SSL certificate, this flag will allow the migration archive to be exported.");
public Option<bool> 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)
{
Expand Down
Loading