diff --git a/packages/core/src/core.ts b/packages/core/src/core.ts index f33b7d86..31c4b113 100644 --- a/packages/core/src/core.ts +++ b/packages/core/src/core.ts @@ -372,6 +372,14 @@ export async function getIDToken(aud?: string): Promise { return await OidcClient.getIDToken(aud) } +/** + * Returns whether action runs on GitHub Enterprise Server or not. + */ +export function isGhes(): boolean { + const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com' + return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM' +} + /** * Summary exports */ @@ -386,8 +394,3 @@ export {markdownSummary} from './summary' * Path exports */ export {toPosixPath, toWin32Path, toPlatformPath} from './path-utils' - -/** - * isGhes helper export - */ -export {isGhes} from './utils' diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index eb7825f5..c43f3870 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -39,11 +39,3 @@ export function toCommandProperties( endColumn: annotationProperties.endColumn } } - -/** - * Returns this action runs on GitHub Enterprise Server or not. - */ -export function isGhes(): boolean { - const url = process.env['GITHUB_SERVER_URL'] || 'https://github.com' - return new URL(url).hostname.toUpperCase() !== 'GITHUB.COM' -}