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

Function isGhes

src/cache-utils.ts:292–303  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

290};
291
292export function isGhes(): boolean {
293 const ghUrl = new URL(
294 process.env['GITHUB_SERVER_URL'] || 'https://github.com'
295 );
296
297 const hostname = ghUrl.hostname.trimEnd().toUpperCase();
298 const isGitHubHost = hostname === 'GITHUB.COM';
299 const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
300 const isLocalHost = hostname.endsWith('.LOCALHOST');
301
302 return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
303}
304
305export function isCacheFeatureAvailable(): boolean {
306 if (cache.isFeatureAvailable()) return true;

Callers 2

isCacheFeatureAvailableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected