update 403 error message for ghes

This commit is contained in:
Bethany
2023-09-05 14:44:53 -07:00
parent 91d3933eb5
commit 1c71f655eb
5 changed files with 42 additions and 14 deletions

View File

@@ -65,3 +65,10 @@ export function getWorkSpaceDirectory(): string {
export function getRetentionDays(): string | undefined {
return process.env['GITHUB_RETENTION_DAYS']
}
export function isGhes(): boolean {
const ghUrl = new URL(
process.env['GITHUB_SERVER_URL'] || 'https://github.com'
)
return ghUrl.hostname.toUpperCase() !== 'GITHUB.COM'
}