Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log the git and metadata archive paths after the download is complete #1325

Merged
merged 3 commits into from
Feb 3, 2025
Merged
Show file tree
Hide file tree
Changes from 2 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 @@

- `gh gei migrate-repo` logs the git and metadata archive download paths when `--keep-archive` is used.
2 changes: 1 addition & 1 deletion src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public MigrateRepoCommand() : base(

public Option<bool> KeepArchive { get; } = new("--keep-archive")
{
Description = "Keeps the archive on this machine after uploading to the blob storage account. Only applicable for migrations from GitHub Enterprise Server versions before 3.8.0."
Description = "Keeps the archive on this machine after uploading to the blob storage account. Only applicable for migrations from GitHub Enterprise Server versions before 3.8.0 or when used with --use-github-storage."
};

public override MigrateRepoCommandHandler BuildHandler(MigrateRepoCommandArgs args, IServiceProvider sp)
Expand Down
4 changes: 2 additions & 2 deletions src/gei/Commands/MigrateRepo/MigrateRepoCommandHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -262,11 +262,11 @@ private string ExtractGhesBaseUrl(string ghesApiUrl)
{
_log.LogInformation($"Downloading archive from {gitArchiveUrl}");
await _httpDownloadService.DownloadToFile(gitArchiveUrl, gitArchiveDownloadFilePath);
_log.LogInformation("Download complete");
_log.LogInformation(keepArchive ? $"Git archive was successfully downloaded at \"{gitArchiveDownloadFilePath}\"" : "Download complete");

_log.LogInformation($"Downloading archive from {metadataArchiveUrl}");
await _httpDownloadService.DownloadToFile(metadataArchiveUrl, metadataArchiveDownloadFilePath);
_log.LogInformation("Download complete");
_log.LogInformation(keepArchive ? $"Metadata archive was successfully downloaded at \"{metadataArchiveDownloadFilePath}\"" : "Download complete");

return (
await UploadArchive(
Expand Down
Loading