gl2gh migrate-repo: log message after successful migration gives incorrect log file URL for ghe.com targets

Open Beginner friendly
#1,612 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
88/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
csharp
Domain
cli

Research direction

Start in src/gl2gh/Commands/MigrateRepo/MigrateRepoCommandHandler.cs around lines 245-255, where the migrationLogUrl and post-migration hint are assembled. Reproduce a GitLab-to-ghe.com migration with --target-api-url and --target-uploads-url, then verify the suggested download-logs command uses the target API endpoint and can retrieve the migration log.

Written by the indexing model from the issue text.

Description

bug

Description

When running gh gl2gh migrate-repo to migrate a GitLab repository to a GitHub data residency (ghe.com) target (--target-api-url and --target-uploads-url are supplied) the migrate-repo command itself prints a hint after the migration completes (or fails) suggesting how to re-fetch the migration log. The link in this hint is incorrect, because it doesn't take the target-api-url into account. The migrationLogUrl in this code snippet doesn't have the correct URL and needs to be fixed:

https://github.com/github/gh-gei/blob/b9b3fa175b9bf99b429f3a628b65fd6846459aee/src/gl2gh/Commands/MigrateRepo/MigrateRepoCommandHandler.cs#L245-L255

The download-logs command itself works correctly when --target-api-url is supplied. If a user copies and runs the suggested command from the hint of migrate-repo as-is, it defaults to https://api.github.com instead of the tenant's ghe.com API endpoint, so it queries the wrong GitHub instance and fails to find (or returns an incorrect) migration log.

Reproduction Steps

Run a regular GitLab to GitHub ghe.com migration and try to open the logs from the CLI.

Dominant language
C#
Stars
479
Forks
148
Avg merge
7d 21h
Merged PRs (30d)
2

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from github/gh-gei

All issues in github/gh-gei

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.