From 4319a9b8a96204d504ed5a3c6d66757679f44ea8 Mon Sep 17 00:00:00 2001 From: Tobias Gabriel Date: Wed, 7 Aug 2024 14:11:47 +0200 Subject: [PATCH 1/2] feat(platform): export PLATFORM_HOST_TYPES constant as value --- lib/constants/platforms.ts | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/lib/constants/platforms.ts b/lib/constants/platforms.ts index 9b5a34c4654355..d9f97058f9dab6 100644 --- a/lib/constants/platforms.ts +++ b/lib/constants/platforms.ts @@ -1,13 +1,17 @@ -export type PlatformId = - | 'azure' - | 'codecommit' - | 'bitbucket' - | 'bitbucket-server' - | 'gerrit' - | 'gitea' - | 'github' - | 'gitlab' - | 'local'; +export const PLATFORM_HOST_TYPES = [ + // All known git platforms + 'azure', + 'bitbucket', + 'bitbucket-server', + 'codecommit', + 'gerrit', + 'gitea', + 'github', + 'gitlab', + 'local', +] as const; + +export type PlatformId = (typeof PLATFORM_HOST_TYPES)[number]; export const GITEA_API_USING_HOST_TYPES = [ 'gitea', From f5d6b9014dd8034702302ad4122cefb9e07ea95b Mon Sep 17 00:00:00 2001 From: Tobias Gabriel Date: Wed, 7 Aug 2024 14:29:22 +0200 Subject: [PATCH 2/2] remove comment --- lib/constants/platforms.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/constants/platforms.ts b/lib/constants/platforms.ts index d9f97058f9dab6..1d8171245f84fe 100644 --- a/lib/constants/platforms.ts +++ b/lib/constants/platforms.ts @@ -1,5 +1,4 @@ export const PLATFORM_HOST_TYPES = [ - // All known git platforms 'azure', 'bitbucket', 'bitbucket-server',