From c404aa5e08751ab3525c5b2e21a6468055bc9221 Mon Sep 17 00:00:00 2001 From: ivinokur Date: Wed, 16 Oct 2024 13:13:03 +0300 Subject: [PATCH 1/2] feat: Allow to configure 2 gitlab providers simultaneously --- packages/common/src/dto/api/index.ts | 1 + packages/dashboard-frontend/src/pages/UserPreferences/const.ts | 1 + 2 files changed, 2 insertions(+) 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/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'; From 5e27b0b84ca521f76481dd229d4e22dd639c6bac Mon Sep 17 00:00:00 2001 From: ivinokur Date: Fri, 25 Oct 2024 16:30:52 +0300 Subject: [PATCH 2/2] fixup! feat: Allow to configure 2 gitlab providers simultaneously --- .../src/pages/UserPreferences/GitServices/List/index.tsx | 1 + .../src/pages/UserPreferences/GitServices/index.tsx | 2 -- 2 files changed, 1 insertion(+), 2 deletions(-) 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 = {