MCPcopy Index your code
hub / github.com/actions/setup-java / isGhes

Function isGhes

src/util.ts:99–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

97}
98
99export function isGhes(): boolean {
100 const ghUrl = new URL(
101 process.env['GITHUB_SERVER_URL'] || 'https://github.com'
102 );
103
104 const hostname = ghUrl.hostname.trimEnd().toUpperCase();
105 const isGitHubHost = hostname === 'GITHUB.COM';
106 const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
107 const isLocalHost = hostname.endsWith('.LOCALHOST');
108
109 return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
110}
111
112export function isCacheFeatureAvailable(): boolean {
113 if (cache.isFeatureAvailable()) {

Callers 2

util.test.tsFile · 0.90
isCacheFeatureAvailableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected