Add support for ghe domains
What does this MR do and why?
This updates the github importer to support GHE domains
This code change improves GitLab's GitHub import feature to better support GitHub Enterprise (GHE) instances, which are private GitHub installations that companies host themselves.
The main improvements include:
-
Better endpoint handling: The system now properly distinguishes between API endpoints (for data access) and web endpoints (for user-facing URLs) when working with custom GitHub Enterprise servers, instead of assuming everything uses the public GitHub.com.
-
Enhanced attachment processing: When importing issues, pull requests, and other content that contains file attachments or images, the system now correctly identifies and downloads these files from GitHub Enterprise servers by using the proper domain URLs.
-
Video file support: Added special handling for video attachments from GitHub Enterprise, including automatically detecting video file types and adding proper file extensions when needed.
-
URL conversion: The system now properly converts GitHub Enterprise URLs to GitLab URLs when importing content, ensuring that links and references work correctly after the import.
These changes ensure that organizations using GitHub Enterprise can successfully import their projects to GitLab with all attachments, images, and links working properly, rather than having broken references or missing files.
Screenshots or screen recordings
| Before | After |
|---|---|
![]() |
![]() |
How to set up and validate locally
It's somewhat complicated to set up a GHE Server instance so here's a video:
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Related to #553386 (closed)

