Skip to content

Recognize *.ghe.com hosts as GitHub Enterprise Cloud#48

Merged
RomainCscn merged 1 commit intolinear:mainfrom
mcomans:fix/ghe-cloud-provider-detection
May 6, 2026
Merged

Recognize *.ghe.com hosts as GitHub Enterprise Cloud#48
RomainCscn merged 1 commit intolinear:mainfrom
mcomans:fix/ghe-cloud-provider-detection

Conversation

@mcomans
Copy link
Copy Markdown
Contributor

@mcomans mcomans commented May 1, 2026

Summary

  • Add host.endsWith(".ghe.com") to the github branch of hostToProvider(). Suffix match (not includes) so attacker-controlled hostnames like evil-ghe.com.attacker.com don't
    false-positive.
  • Add unit tests to cover positive (acme.ghe.com, tenant-name.ghe.com) and negative (bare ghe.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() returned null for the host, so the Linear API rejected the sync with:

Variable $input got invalid value null at input.repository.provider;
Expected non-nullable type String! not to be null.

As a quick workaround we rewrote the git remote to swap the *.ghe.com host for github.com so the URL would hit the existing github branch in hostToProvider(), 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), so extractBranchNameFromMergeMessage and the rest of the pipeline work unchanged.

About GitHub Enterprise Cloud with data residency and GHE.com domains

@RomainCscn RomainCscn merged commit 42772dd into linear:main May 6, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants