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

Function isGhes

src/utils.ts:115–126  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

113}
114
115export function isGhes(): boolean {
116 const ghUrl = new URL(
117 process.env['GITHUB_SERVER_URL'] || 'https://github.com'
118 );
119
120 const hostname = ghUrl.hostname.trimEnd().toUpperCase();
121 const isGitHubHost = hostname === 'GITHUB.COM';
122 const isGitHubEnterpriseCloudHost = hostname.endsWith('.GHE.COM');
123 const isLocalHost = hostname.endsWith('.LOCALHOST');
124
125 return !isGitHubHost && !isGitHubEnterpriseCloudHost && !isLocalHost;
126}
127
128export function isCacheFeatureAvailable(): boolean {
129 if (cache.isFeatureAvailable()) {

Callers 2

utils.test.tsFile · 0.90
isCacheFeatureAvailableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected