Recognize *.ghe.com hosts as GitHub Enterprise Cloud#48
Merged
RomainCscn merged 1 commit intolinear:mainfrom May 6, 2026
Merged
Recognize *.ghe.com hosts as GitHub Enterprise Cloud#48RomainCscn merged 1 commit intolinear:mainfrom
RomainCscn merged 1 commit intolinear:mainfrom
Conversation
RomainCscn
approved these changes
May 6, 2026
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
host.endsWith(".ghe.com")to the github branch ofhostToProvider(). Suffix match (notincludes) so attacker-controlled hostnames likeevil-ghe.com.attacker.comdon'tfalse-positive.
acme.ghe.com,tenant-name.ghe.com) and negative (bareghe.com, substring) cases.Context
We hit this when running the action against a repo hosted on GitHub Enterprise Cloud with data residency (hostname under
*.ghe.com).hostToProvider()returnednullfor the host, so the Linear API rejected the sync with:As a quick workaround we rewrote the git remote to swap the
*.ghe.comhost forgithub.comso the URL would hit the existing github branch inhostToProvider(), however that results in the links to the repository from Linear not working correctly. GHE Cloud should be functionally equivalent to github.com for what the CLI cares about, e.g. the same PR-merge commit conventions hold (Merge pull request #N from owner/branch), soextractBranchNameFromMergeMessageand the rest of the pipeline work unchanged.About GitHub Enterprise Cloud with data residency and GHE.com domains