mirror of
https://git.mirrors.martin98.com/https://github.com/actions/toolkit
synced 2026-04-16 09:18:04 +08:00
update 403 error message for ghes
This commit is contained in:
@@ -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'
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user