Add support for migrating from GitHub Enterprise Cloud with data residency (ghe.com) - #1600
Merged
Conversation
Unit Test Results 1 files 1 suites 24s ⏱️ Results for commit 3a4ecf3. ♻️ This comment has been updated with latest results. |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds GitHub Enterprise Cloud data-residency tenants as migration sources.
Changes:
- Adds
--github-source-api-urlandGH_SOURCE_API_URLsupport. - Routes repository and alert migrations through the source tenant.
- Adds documentation, release notes, unit tests, and Proxima integration coverage.
Show a summary per file
| File | Description |
|---|---|
src/OctoshiftCLI.Tests/StringExtensionsTests.cs |
Tests data-residency URL detection. |
src/OctoshiftCLI.Tests/gei/Services/GhesVersionCheckerTests.cs |
Tests version-check bypass. |
src/OctoshiftCLI.Tests/gei/Commands/MigrateSecretAlerts/MigrateSecretAlertsCommandTests.cs |
Verifies the new option. |
src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandTests.cs |
Verifies the new option. |
src/OctoshiftCLI.Tests/gei/Commands/MigrateRepo/MigrateRepoCommandArgsTests.cs |
Tests argument validation and routing. |
src/OctoshiftCLI.Tests/gei/Commands/MigrateCodeScanningAlerts/MigrateCodeScanningAlertsCommandTests.cs |
Verifies the new option. |
src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandTests.cs |
Verifies the new option. |
src/OctoshiftCLI.Tests/gei/Commands/GenerateScript/GenerateScriptCommandHandlerTests.cs |
Tests generated source flags. |
src/OctoshiftCLI.IntegrationTests/ProximaToGithub.cs |
Adds end-to-end migration coverage. |
src/Octoshift/Services/EnvironmentVariableProvider.cs |
Exposes the source API environment variable. |
src/Octoshift/Extensions/StringExtensions.cs |
Detects data-residency API URLs. |
src/gei/Services/GhesVersionChecker.cs |
Bypasses GHES checks for cloud tenants. |
src/gei/Commands/MigrateSecretAlerts/MigrateSecretAlertsCommandArgs.cs |
Resolves and validates source URLs. |
src/gei/Commands/MigrateSecretAlerts/MigrateSecretAlertsCommand.cs |
Adds and forwards the option. |
src/gei/Commands/MigrateRepo/MigrateRepoCommandHandler.cs |
Routes archive migration through the source tenant. |
src/gei/Commands/MigrateRepo/MigrateRepoCommandArgs.cs |
Adds source URL configuration and validation. |
src/gei/Commands/MigrateRepo/MigrateRepoCommand.cs |
Adds and wires the option. |
src/gei/Commands/MigrateCodeScanningAlerts/MigrateCodeScanningAlertsCommandArgs.cs |
Resolves and validates source URLs. |
src/gei/Commands/MigrateCodeScanningAlerts/MigrateCodeScanningAlertsCommand.cs |
Adds and forwards the option. |
src/gei/Commands/GenerateScript/GenerateScriptCommandHandler.cs |
Emits the appropriate source flag. |
src/gei/Commands/GenerateScript/GenerateScriptCommandArgs.cs |
Adds source URL validation and defaults. |
src/gei/Commands/GenerateScript/GenerateScriptCommand.cs |
Adds and wires the option. |
RELEASENOTES.md |
Announces data-residency source support. |
README.md |
Documents data-residency migrations. |
.github/workflows/integration-tests.yml |
Adds Proxima integration jobs. |
.github/workflows/CI.yml |
Adds Proxima CI coverage. |
Review details
Tip
Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 26/26 changed files
- Comments generated: 2
- Review effort level: Balanced
brianaj
marked this pull request as ready for review
August 12, 2026 00:05
mulana
approved these changes
Aug 12, 2026
Contributor
There was a problem hiding this comment.
Review details
Suppressed comments (1)
src/gei/Commands/MigrateRepo/MigrateRepoCommandHandler.cs:75
- For a data-residency source, the version check returns
false, so this call reaches GHES-specific warnings inValidateUploadOptions(for example, it says GHES 3.8 or Management Console credentials are being used). Those messages are incorrect forghe.com; make the warnings source-aware or use storage-flow wording that applies to both source types.
if (sourceApiUrl.HasValue() || args.GitArchivePath.HasValue())
{
ValidateUploadOptions(args, blobCredentialsRequired);
- Files reviewed: 26/26 changed files
- Comments generated: 4
- Review effort level: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds support for using a GitHub Enterprise Cloud with data residency tenant (
*.ghe.com) as the source of a repository migration ingh gei. Previously, the source could be github.com or GitHub Enterprise Server, but not a data residency tenant. The migration flow mirrors the existing GHES source path — the CLI calls the source tenant's migration APIs to generate an archive, downloads it, uploads to blob storage, and imports it on the target.New CLI surface
A new
--github-source-api-urloption is available on:gh gei migrate-repogh gei generate-scriptgh gei migrate-secret-alertsgh gei migrate-code-scanning-alertsThe value should be the API endpoint of the source data residency tenant, for example:
It can also be set via the
GH_SOURCE_API_URLenvironment variable.--github-source-api-urland--ghes-api-urlare mutually exclusive.Example
If the target is also a data residency tenant, add
--target-api-urland--target-uploads-urlas usual.Behavior
--use-github-storageopts into the multipart upload path — the archive is downloaded locally and reuploaded to GitHub-owned storage before the target migration starts. Same behavior as--use-github-storageon modern GHES today.api.<subdomain>.ghe.comURL shape and defaults to modern behavior (GHOS supported).gh gei generate-scriptemits--github-source-api-url(rather than--ghes-api-url) for data residency sources so the generatedmigrate.ps1runs cleanly.What doesn't change
--ghes-api-urlbehavior is untouched. Existing GHES source migrations continue to work exactly as before.github.com → github.com,github.com → data residency,GHES → github.com,GHES → data residency.--target-api-urlbehavior is unchanged.download-logs,wait-for-migration,abort-migrationdon't need the new flag — the log URL is served by the target, not the source.Testing
.github/workflows/CI.yml).Docs / release notes
Updated
README.mdwith a "Migrating from GitHub Enterprise Cloud with data residency" subsection.Added a
RELEASENOTES.mdentry.Did you write/update appropriate tests
Release notes updated (if appropriate)
Appropriate logging output
Issue linked
Docs updated (or issue created)
New package licenses are added to
ThirdPartyNotices.txt(if applicable)