allow localhost hostnames for artifact checks

This commit is contained in:
Rob Herley
2024-07-03 16:55:53 +00:00
committed by GitHub
parent 361a115e53
commit 176b40a888
4 changed files with 13 additions and 4 deletions

View File

@@ -20,6 +20,11 @@ describe('isGhes', () => {
expect(config.isGhes()).toBe(false)
})
it('should return false when the request domain ends with .localhost', () => {
process.env.GITHUB_SERVER_URL = 'https://github.localhost'
expect(config.isGhes()).toBe(false)
})
it('should return false when the request domain is specific to an enterprise', () => {
process.env.GITHUB_SERVER_URL = 'https://my-enterprise.github.com'
expect(config.isGhes()).toBe(true)