gl2gh migrate-repo: log message after successful migration gives incorrect log file URL for ghe.com targets
- Dominant language
- C#
- Stars
- 478
- Forks
- 146
- Avg merge
- 7d 21h
- Merged PRs (30d)
- 2
Description
## 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.
Contributor guide
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.
Assessment
- Tech stack
- csharp
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100