From 8319b811edda82a86c0e42cbd4c87ddc5c93dbb4 Mon Sep 17 00:00:00 2001 From: Igor Vinokur Date: Mon, 28 Oct 2024 14:53:23 +0200 Subject: [PATCH] feat: Allow to configure 2 gitlab providers simultaneously (#1237) --- packages/common/src/dto/api/index.ts | 1 + .../src/pages/UserPreferences/GitServices/List/index.tsx | 1 + .../src/pages/UserPreferences/GitServices/index.tsx | 2 -- packages/dashboard-frontend/src/pages/UserPreferences/const.ts | 1 + 4 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/common/src/dto/api/index.ts b/packages/common/src/dto/api/index.ts index 2fe73124c..fced51621 100644 --- a/packages/common/src/dto/api/index.ts +++ b/packages/common/src/dto/api/index.ts @@ -25,6 +25,7 @@ export type GitOauthProvider = | 'github' | 'github_2' | 'gitlab' + | 'gitlab_2' | 'bitbucket' | 'bitbucket-server' | 'azure-devops'; diff --git a/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/List/index.tsx b/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/List/index.tsx index ed2e8eb25..33c4f3d57 100644 --- a/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/List/index.tsx +++ b/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/List/index.tsx @@ -35,6 +35,7 @@ export const CAN_REVOKE_FROM_DASHBOARD: ReadonlyArray = [ 'github', 'github_2', 'gitlab', + 'gitlab_2', ]; export type Props = { diff --git a/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/index.tsx b/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/index.tsx index 13d376f51..6139a7fca 100644 --- a/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/index.tsx +++ b/packages/dashboard-frontend/src/pages/UserPreferences/GitServices/index.tsx @@ -32,8 +32,6 @@ import { import { IGitOauth } from '@/store/GitOauthConfig/types'; import * as PersonalAccessTokenStore from '@/store/PersonalAccessToken'; -export const enabledProviders: api.GitOauthProvider[] = ['github', 'github_2', 'gitlab']; - type Props = MappedProps; type State = { diff --git a/packages/dashboard-frontend/src/pages/UserPreferences/const.ts b/packages/dashboard-frontend/src/pages/UserPreferences/const.ts index 516fc639e..c0010b585 100644 --- a/packages/dashboard-frontend/src/pages/UserPreferences/const.ts +++ b/packages/dashboard-frontend/src/pages/UserPreferences/const.ts @@ -23,6 +23,7 @@ export const GIT_OAUTH_PROVIDERS: Record = { github: 'GitHub', github_2: 'GitHub (The second provider)', gitlab: 'GitLab', + gitlab_2: 'GitLab (The second provider)', } as const; export const DEFAULT_GIT_OAUTH_PROVIDER: api.GitOauthProvider = 'github';