From 9008c2e533a4887be3f9cab36082ee9e30587114 Mon Sep 17 00:00:00 2001 From: Tobias <tobias.gabriel@sap.com> Date: Wed, 7 Aug 2024 23:54:53 +0200 Subject: [PATCH] chore(git): use PLATFORM_HOST_TYPES as supported git hosts for gitAllowedHostTypes (#30643) --- lib/util/git/auth.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/util/git/auth.ts b/lib/util/git/auth.ts index 9bbffcbc4c..ad2726797b 100644 --- a/lib/util/git/auth.ts +++ b/lib/util/git/auth.ts @@ -1,4 +1,4 @@ -import type { PlatformId } from '../../constants/platforms'; +import { PLATFORM_HOST_TYPES } from '../../constants/platforms'; import { logger } from '../../logger'; import type { HostRule } from '../../types'; import { detectPlatform } from '../common'; @@ -15,16 +15,6 @@ const githubApiUrls = new Set([ 'https://api.github.com/', ]); -const standardGitAllowedHostTypes = [ - // All known git platforms - 'azure', - 'bitbucket', - 'bitbucket-server', - 'gitea', - 'github', - 'gitlab', -] satisfies PlatformId[]; - /** * Add authorization to a Git Url and returns a new environment variables object * @returns a new NodeJS.ProcessEnv object without modifying any input parameters @@ -194,7 +184,7 @@ export function getGitEnvironmentVariables( // construct the Set of allowed hostTypes consisting of the standard Git provides // plus additionalHostTypes, which are provided as parameter const gitAllowedHostTypes = new Set<string>([ - ...standardGitAllowedHostTypes, + ...PLATFORM_HOST_TYPES, ...additionalHostTypes, ]); -- GitLab