diff --git a/backend/src/lib/api-docs/constants.ts b/backend/src/lib/api-docs/constants.ts index 728ab1d64..cb234e98b 100644 --- a/backend/src/lib/api-docs/constants.ts +++ b/backend/src/lib/api-docs/constants.ts @@ -2232,7 +2232,8 @@ export const AppConnections = { GITLAB: { instanceUrl: "The GitLab instance URL to connect with.", accessToken: "The Access Token used to access GitLab.", - code: "The OAuth code to use to connect with GitLab." + code: "The OAuth code to use to connect with GitLab.", + accessTokenType: "The type of token used to connect with GitLab." } } }; diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-enums.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-enums.ts index 2046ceae8..3bd01d147 100644 --- a/backend/src/services/app-connection/gitlab/gitlab-connection-enums.ts +++ b/backend/src/services/app-connection/gitlab/gitlab-connection-enums.ts @@ -2,3 +2,8 @@ export enum GitLabConnectionMethod { OAuth = "oauth", AccessToken = "access-token" } + +export enum GitLabAccessTokenType { + Project = "project", + Personal = "personal" +} diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts index 93bbbc594..3b643ac3d 100644 --- a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts +++ b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts @@ -79,10 +79,13 @@ export const refreshGitLabToken = async ( } }); - const expiresAt = new Date(Date.now() + data.expires_in * 1000 - 60000); + const expiresAt = new Date(Date.now() + data.expires_in * 1000 - 600000); const encryptedCredentials = await encryptAppConnectionCredentials({ credentials: { + instanceUrl, + tokenType: data.token_type, + createdAt: new Date(data.created_at * 1000).toISOString(), refreshToken: data.refresh_token, accessToken: data.access_token, expiresAt @@ -174,7 +177,7 @@ export const validateGitLabConnectionCredentials = async (config: TGitLabConnect try { const url = await getGitLabInstanceUrl(inputCredentials.instanceUrl); - response = await request.get(`${url}/api/v4/groups`, { + response = await request.get(`${url}/api/v4/user`, { headers: { Authorization: `Bearer ${accessToken}`, Accept: "application/json" @@ -200,6 +203,7 @@ export const validateGitLabConnectionCredentials = async (config: TGitLabConnect if (method === GitLabConnectionMethod.OAuth && oauthData) { return { accessToken, + instanceUrl: inputCredentials.instanceUrl, refreshToken: oauthData.refresh_token, expiresAt: new Date(Date.now() + oauthData.expires_in * 1000 - 60000), tokenType: oauthData.token_type, diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-schemas.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-schemas.ts index 2d4b9bc1b..936a370bf 100644 --- a/backend/src/services/app-connection/gitlab/gitlab-connection-schemas.ts +++ b/backend/src/services/app-connection/gitlab/gitlab-connection-schemas.ts @@ -8,9 +8,8 @@ import { GenericUpdateAppConnectionFieldsSchema } from "@app/services/app-connection/app-connection-schemas"; -import { GitLabConnectionMethod } from "./gitlab-connection-enums"; +import { GitLabAccessTokenType, GitLabConnectionMethod } from "./gitlab-connection-enums"; -// Fixed: Use consistent accessToken naming throughout export const GitLabConnectionAccessTokenCredentialsSchema = z.object({ accessToken: z .string() @@ -22,7 +21,8 @@ export const GitLabConnectionAccessTokenCredentialsSchema = z.object({ .trim() .url("Invalid Instance URL") .optional() - .describe(AppConnections.CREDENTIALS.GITLAB.instanceUrl) + .describe(AppConnections.CREDENTIALS.GITLAB.instanceUrl), + accessTokenType: z.nativeEnum(GitLabAccessTokenType).describe(AppConnections.CREDENTIALS.GITLAB.accessTokenType) }); export const GitLabConnectionOAuthCredentialsSchema = z.object({ @@ -35,7 +35,6 @@ export const GitLabConnectionOAuthCredentialsSchema = z.object({ .describe(AppConnections.CREDENTIALS.GITLAB.instanceUrl) }); -// Fixed: Updated schema to match GitLab's actual OAuth response structure export const GitLabConnectionOAuthOutputCredentialsSchema = z.object({ accessToken: z.string().trim(), refreshToken: z.string().trim(), @@ -50,7 +49,6 @@ export const GitLabConnectionOAuthOutputCredentialsSchema = z.object({ .describe(AppConnections.CREDENTIALS.GITLAB.instanceUrl) }); -// Schema for refresh token input during initial setup export const GitLabConnectionRefreshTokenCredentialsSchema = z.object({ refreshToken: z.string().trim().min(1, "Refresh token required"), instanceUrl: z @@ -83,8 +81,9 @@ export const SanitizedGitLabConnectionSchema = z.discriminatedUnion("method", [ BaseGitLabConnectionSchema.extend({ method: z.literal(GitLabConnectionMethod.AccessToken), credentials: GitLabConnectionAccessTokenCredentialsSchema.pick({ - instanceUrl: true - }) // Don't expose sensitive data + instanceUrl: true, + accessTokenType: true + }) }), BaseGitLabConnectionSchema.extend({ method: z.literal(GitLabConnectionMethod.OAuth), diff --git a/backend/src/services/secret-sync/gitlab/gitlab-sync-fns.ts b/backend/src/services/secret-sync/gitlab/gitlab-sync-fns.ts index b9995436e..cbdce57a2 100644 --- a/backend/src/services/secret-sync/gitlab/gitlab-sync-fns.ts +++ b/backend/src/services/secret-sync/gitlab/gitlab-sync-fns.ts @@ -271,67 +271,84 @@ export const GitLabSyncFns = { const currentVariableMap = new Map(currentVariables.map((v) => [v.key, v])); for (const [key, { value }] of Object.entries(secretMap)) { - const existingVariable = currentVariableMap.get(key); + try { + const existingVariable = currentVariableMap.get(key); - if (existingVariable) { - if (existingVariable.value !== value) { - await updateGitLabVariable({ + if (existingVariable) { + if (existingVariable.value !== value) { + await updateGitLabVariable({ + accessToken, + connection, + projectId, + key, + variable: { + value, + variable_type: existingVariable.variable_type, + environment_scope: targetEnvironment || existingVariable.environment_scope, + protected: destinationConfig.shouldProtectSecrets ?? existingVariable.protected, + ...(!existingVariable.masked && destinationConfig.shouldMaskSecrets && { masked: value?.length > 8 }), + ...(!existingVariable.hidden && + destinationConfig.shouldHideSecrets && { masked_and_hidden: value?.length > 8 }), + description: existingVariable.description ?? undefined + }, + targetEnvironment + }); + } + } else { + await createGitLabVariable({ accessToken, connection, projectId, - key, variable: { + key, value, - variable_type: existingVariable.variable_type, - environment_scope: targetEnvironment || existingVariable.environment_scope, - protected: destinationConfig.shouldProtectSecrets ?? existingVariable.protected, - ...(!existingVariable.masked && destinationConfig.shouldMaskSecrets && { masked: value?.length > 8 }), - ...(!existingVariable.hidden && - destinationConfig.shouldHideSecrets && { masked_and_hidden: value?.length > 8 }), - description: existingVariable.description ?? undefined - }, - targetEnvironment + variable_type: "env_var", + environment_scope: targetEnvironment || "*", + protected: destinationConfig.shouldProtectSecrets || false, + masked: value?.length > 8 ? destinationConfig.shouldMaskSecrets || false : false, + masked_and_hidden: value?.length > 8 ? destinationConfig.shouldHideSecrets || false : false + } }); } - } else { - await createGitLabVariable({ - accessToken, - connection, - projectId, - variable: { - key, - value, - variable_type: "env_var", - environment_scope: targetEnvironment || "*", - protected: destinationConfig.shouldProtectSecrets || false, - masked: value?.length > 8 ? destinationConfig.shouldMaskSecrets || false : false, - masked_and_hidden: value?.length > 8 ? destinationConfig.shouldHideSecrets || false : false - } + } catch (error) { + throw new SecretSyncError({ + error, + secretKey: key }); } } if (!secretSync.syncOptions.disableSecretDeletion) { for (const variable of currentVariables) { - const shouldDelete = - matchesSchema(variable.key, environment?.slug || "", secretSync.syncOptions.keySchema) && - !(variable.key in secretMap); + try { + const shouldDelete = + matchesSchema(variable.key, environment?.slug || "", secretSync.syncOptions.keySchema) && + !(variable.key in secretMap); - if (shouldDelete) { - await deleteGitLabVariable({ - accessToken, - connection, - projectId, - key: variable.key, - targetEnvironment + if (shouldDelete) { + await deleteGitLabVariable({ + accessToken, + connection, + projectId, + key: variable.key, + targetEnvironment + }); + } + } catch (error) { + throw new SecretSyncError({ + error, + secretKey: variable.key }); } } } } catch (error) { + if (error instanceof SecretSyncError) { + throw error; + } throw new SecretSyncError({ - error, - secretKey: "batch_sync" + message: "Failed to sync secrets", + error }); } }, @@ -347,8 +364,8 @@ export const GitLabSyncFns = { const accessToken = await getValidAccessToken(connection, appConnectionDAL, kmsService); - try { - for (const key of Object.keys(secretMap)) { + for (const key of Object.keys(secretMap)) { + try { await deleteGitLabVariable({ accessToken, connection, @@ -356,12 +373,12 @@ export const GitLabSyncFns = { key, targetEnvironment }); + } catch (error) { + throw new SecretSyncError({ + error, + secretKey: key + }); } - } catch (error) { - throw new SecretSyncError({ - error, - secretKey: "batch_remove" - }); } }, diff --git a/backend/src/services/secret-sync/gitlab/gitlab-sync-types.ts b/backend/src/services/secret-sync/gitlab/gitlab-sync-types.ts index c9b82739e..3713f7b59 100644 --- a/backend/src/services/secret-sync/gitlab/gitlab-sync-types.ts +++ b/backend/src/services/secret-sync/gitlab/gitlab-sync-types.ts @@ -12,7 +12,6 @@ export type TGitLabSyncWithCredentials = TGitLabSync & { connection: TGitLabConnection; }; -// GitLab CI/CD Variable structure based on API documentation export type TGitLabVariable = { key: string; value: string; @@ -25,7 +24,6 @@ export type TGitLabVariable = { description: string | null; }; -// Type for creating a new variable export type TGitLabVariableCreate = { key: string; value: string; @@ -37,7 +35,6 @@ export type TGitLabVariableCreate = { description?: string; }; -// Type for updating an existing variable export type TGitLabVariableUpdate = { value: string; variable_type?: "env_var" | "file"; diff --git a/docs/integrations/app-connections/gitlab.mdx b/docs/integrations/app-connections/gitlab.mdx index c923f9c63..e16ccd57c 100644 --- a/docs/integrations/app-connections/gitlab.mdx +++ b/docs/integrations/app-connections/gitlab.mdx @@ -1,6 +1,6 @@ --- -title: "GitLab App Connection" -description: "Learn how to configure a GitLab App Connection for Infisical using OAuth or Access Token methods." +title: "GitLab Connection" +description: "Learn how to configure a GitLab Connection for Infisical using OAuth or Access Token methods." --- Infisical supports two methods for connecting to GitLab: **OAuth** and **Access Token**. Choose the method that best fits your setup and security requirements. @@ -10,7 +10,7 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access The OAuth method provides secure authentication through GitLab's OAuth flow. - Using the GitLab App Connection with OAuth on a self-hosted instance of Infisical requires configuring an OAuth application in GitLab and registering your instance with it. + Using the GitLab Connection with OAuth on a self-hosted instance of Infisical requires configuring an OAuth application in GitLab and registering your instance with it. **Prerequisites:** - A GitLab account with existing projects @@ -47,7 +47,7 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access - `CLIENT_ID_GITLAB`: The **Application ID** of your GitLab OAuth application. - `CLIENT_SECRET_GITLAB`: The **Secret** of your GitLab OAuth application. - Once added, restart your Infisical instance and use the GitLab App Connection. + Once added, restart your Infisical instance and use the GitLab Connection. @@ -60,7 +60,7 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access ![App Connections Tab](/images/app-connections/general/add-connection.png) - Select the **GitLab App Connection** option from the connection options modal. + Select the **GitLab Connection** option from the connection options modal. ![Select GitLab Connection](/images/app-connections/gitlab/select-gitlab-connection.png) @@ -73,7 +73,7 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access ![GitLab Authorization](/images/app-connections/gitlab/gitlab-authorization-page.png) - Your **GitLab App Connection** is now available for use. + Your **GitLab Connection** is now available for use. ![GitLab OAuth Connection](/images/app-connections/gitlab/gitlab-oauth-connection.png) @@ -96,13 +96,17 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access ![GitLab Personal Access Tokens](/images/app-connections/gitlab/gitlab-add-access-token.png) - Fill in the token details: - - **Token name**: A descriptive name for the token (e.g., "connection-token") - - **Expiration date**: Set an appropriate expiration date - - **Select scopes**: Choose the **api** scope for full API access - - ![GitLab Personal Token Form](/images/app-connections/gitlab/gitlab-personal-access-token-form.png) + + + For Secret Rotations, your token will require the ability to access the API: + Fill in the token details: + - **Token name**: A descriptive name for the token (e.g., "connection-token") + - **Expiration date**: Set an appropriate expiration date + - **Select scopes**: Choose the **api** scope for full API access + ![GitLab Personal Token Form](/images/app-connections/gitlab/gitlab-personal-access-token-form.png) + + Copy the generated token immediately as it won't be shown again. @@ -126,19 +130,31 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access ![GitLab Project Access Tokens](/images/app-connections/gitlab/gitlab-project-access-token-list.png) - Fill in the token details: - - **Token name**: A descriptive name for the token - - **Expiration date**: Set an appropriate expiration date - - **Select role**: Choose **Owner** or higher role - - **Select scopes**: Choose the **api** scope for API access + + + For Secret Rotations, your token will require the ability to access the API and be at least an **Owner**: + Fill in the token details: + - **Token name**: A descriptive name for the token + - **Expiration date**: Set an appropriate expiration date + - **Select role**: Choose **Owner** or higher role + - **Select scopes**: Choose the **api** scope for API access - ![GitLab Create Project Token](/images/app-connections/gitlab/gitlab-project-access-token-form.png) + ![GitLab Create Project Token](/images/app-connections/gitlab/gitlab-project-access-token-form.png) + + + + Access Token connections require manual token rotation when your GitLab access token expires or is regenerated. Monitor your connection status and update the token as needed. + Copy the generated token immediately as it won't be shown again. ![GitLab Project Token Form](/images/app-connections/gitlab/gitlab-project-access-token-created.png) + + + Keep your access token secure and do not share it. Anyone with access to this token can access your GitLab account and projects. + @@ -152,7 +168,7 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access ![App Connections Tab](/images/app-connections/general/add-connection.png) - Select the **GitLab App Connection** option from the connection options modal. + Select the **GitLab Connection** option from the connection options modal. ![Select GitLab Connection](/images/app-connections/gitlab/select-gitlab-connection.png) @@ -163,14 +179,10 @@ Infisical supports two methods for connecting to GitLab: **OAuth** and **Access Click **Connect** to establish the connection. - Your **GitLab App Connection** is now available for use. + Your **GitLab Connection** is now available for use. ![GitLab Access Token Connection](/images/app-connections/gitlab/gitlab-access-token-connection.png) - - Access Token connections require manual token rotation when your GitLab access token expires or is regenerated. Monitor your connection status and update the token as needed. - - diff --git a/docs/integrations/app-connections/heroku.mdx b/docs/integrations/app-connections/heroku.mdx index d67411627..fc2d1fbcc 100644 --- a/docs/integrations/app-connections/heroku.mdx +++ b/docs/integrations/app-connections/heroku.mdx @@ -1,6 +1,6 @@ --- -title: "Heroku App Connection" -description: "Learn how to configure a Heroku App Connection for Infisical using OAuth or Auth Token methods." +title: "Heroku Connection" +description: "Learn how to configure a Heroku Connection for Infisical using OAuth or Auth Token methods." --- Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth Token**. Choose the method that best fits your setup and security requirements. @@ -10,7 +10,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To The OAuth method provides secure authentication through Heroku's OAuth flow. - Using the Heroku App Connection with OAuth on a self-hosted instance of Infisical requires configuring an API client in Heroku and registering your instance with it. + Using the Heroku Connection with OAuth on a self-hosted instance of Infisical requires configuring an API client in Heroku and registering your instance with it. **Prerequisites:** - A Heroku account with existing applications @@ -42,7 +42,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To - `CLIENT_ID_HEROKU`: The **Client ID** of your Heroku API client. - `CLIENT_SECRET_HEROKU`: The **Client Secret** of your Heroku API client. - Once added, restart your Infisical instance and use the Heroku App Connection. + Once added, restart your Infisical instance and use the Heroku Connection. @@ -55,7 +55,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To ![App Connections Tab](/images/app-connections/general/add-connection.png) - Select the **Heroku App Connection** option from the connection options modal. + Select the **Heroku Connection** option from the connection options modal. ![Select Heroku Connection](/images/app-connections/heroku/heroku-select-connection.png) @@ -68,7 +68,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To ![Heroku Authorization](/images/integrations/heroku/integrations-heroku-auth.png) - Your **Heroku App Connection** is now available for use. + Your **Heroku Connection** is now available for use. ![Heroku OAuth Connection](/images/app-connections/heroku/heroku-connection.png) @@ -97,7 +97,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To ![App Connections Tab](/images/app-connections/general/add-connection.png) - Select the **Heroku App Connection** option from the connection options modal. + Select the **Heroku Connection** option from the connection options modal. ![Select Heroku Connection](/images/app-connections/heroku/heroku-select-connection.png) @@ -108,7 +108,7 @@ Infisical supports two methods for connecting to Heroku: **OAuth** and **Auth To Click **Connect** to establish the connection. - Your **Heroku App Connection** is now available for use. + Your **Heroku Connection** is now available for use. ![Heroku Auth Token Connection](/images/app-connections/heroku/heroku-connection.png) diff --git a/docs/integrations/secret-syncs/gitlab.mdx b/docs/integrations/secret-syncs/gitlab.mdx index bc60c6245..8ea2673d9 100644 --- a/docs/integrations/secret-syncs/gitlab.mdx +++ b/docs/integrations/secret-syncs/gitlab.mdx @@ -39,17 +39,17 @@ description: "Learn how to configure a GitLab Sync for Infisical." - **GitLab Project**: The project to deploy secrets to. - **GitLab Environment Scope**: The environment scope to deploy secrets to (optional, defaults to "*" for all environments). - - **Mark Infisical secrets in GitLab as 'Protected' secrets**: If enabled, synced secrets will be marked as protected in GitLab. - - **Mark Infisical secrets in GitLab as 'Masked' secrets**: If enabled, synced secrets will be masked in GitLab CI/CD logs. - - **Mark Infisical secrets in GitLab as 'Hidden' secrets**: If enabled, synced secrets will be hidden from the GitLab UI. + - **Mark secrets as Protected**: If enabled, synced secrets will be marked as protected in GitLab. + - **Mark secrets as Masked**: If enabled, synced secrets will be masked in GitLab CI/CD logs. + - **Mark secrets as Hidden**: If enabled, synced secrets will be hidden from the GitLab UI. - **GitLab Group**: The group containing the project. - **GitLab Project**: The project to deploy secrets to. - **GitLab Environment Scope**: The environment scope to deploy secrets to (optional, defaults to "*" for all environments). - - **Mark Infisical secrets in GitLab as 'Protected' secrets**: If enabled, synced secrets will be marked as protected in GitLab. - - **Mark Infisical secrets in GitLab as 'Masked' secrets**: If enabled, synced secrets will be masked in GitLab CI/CD logs. - - **Mark Infisical secrets in GitLab as 'Hidden' secrets**: If enabled, synced secrets will be hidden from the GitLab UI. + - **Mark secrets as Protected**: If enabled, synced secrets will be marked as protected in GitLab. + - **Mark secrets as Masked**: If enabled, synced secrets will be masked in GitLab CI/CD logs. + - **Mark secrets as Hidden**: If enabled, synced secrets will be hidden from the GitLab UI. diff --git a/docs/integrations/secret-syncs/heroku.mdx b/docs/integrations/secret-syncs/heroku.mdx index e62b5df9e..b7aa2850a 100644 --- a/docs/integrations/secret-syncs/heroku.mdx +++ b/docs/integrations/secret-syncs/heroku.mdx @@ -6,7 +6,7 @@ description: "Learn how to configure a Heroku Sync for Infisical." **Prerequisites:** - Set up and add secrets to [Infisical Cloud](https://app.infisical.com) -- Create a [Heroku App Connection](/integrations/app-connections/heroku) +- Create a [Heroku Connection](/integrations/app-connections/heroku) @@ -29,7 +29,7 @@ description: "Learn how to configure a Heroku Sync for Infisical." 4. Configure the **Destination** to where secrets should be deployed, then click **Next**. ![Configure Destination](/images/secret-syncs/heroku/heroku-destination.png) - - **Heroku App Connection**: The Heroku App Connection to authenticate with. + - **Heroku Connection**: The Heroku Connection to authenticate with. - **Heroku App**: The Heroku application to sync secrets to. 5. Configure the **Sync Options** to specify how secrets should be synced, then click **Next**. diff --git a/docs/self-hosting/configuration/envars.mdx b/docs/self-hosting/configuration/envars.mdx index efce4d912..42756e593 100644 --- a/docs/self-hosting/configuration/envars.mdx +++ b/docs/self-hosting/configuration/envars.mdx @@ -590,6 +590,17 @@ You can configure third-party app connections for re-use across Infisical Projec + + + The Application ID of your GitLab OAuth application. + + + + The Secret of your GitLab OAuth application. + + + + ## Native Secret Integrations To help you sync secrets from Infisical to services such as Github and Gitlab, Infisical provides native integrations out of the box. diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx index b4af0291c..eab2120e6 100644 --- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx +++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx @@ -1,6 +1,6 @@ import { Controller, useFormContext, useWatch } from "react-hook-form"; import { SingleValue } from "react-select"; -import { faCircleInfo } from "@fortawesome/free-solid-svg-icons"; +import { faCircleInfo, faQuestionCircle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { SecretSyncConnectionField } from "@app/components/secret-syncs/forms/SecretSyncConnectionField"; @@ -40,26 +40,24 @@ const SecretProtectionOption = ({ tooltip?: string; }) => { return ( -
-
-
-
-

{title}

- {tooltip && ( - - - - )} -
-
-
-
- -
-
+ +

+ {title}{" "} + {tooltip && ( + + + + )} +

+
); }; @@ -86,7 +84,7 @@ export const GitLabSyncFields = () => { ); return ( -
+
{ setValue("destinationConfig.projectId", ""); @@ -175,7 +173,7 @@ export const GitLabSyncFields = () => { helperText={
Don't see the project you're looking for?{" "} @@ -229,7 +227,7 @@ export const GitLabSyncFields = () => { render={({ field: { onChange, value } }) => ( @@ -242,7 +240,7 @@ export const GitLabSyncFields = () => { render={({ field: { onChange, value } }) => ( { @@ -262,7 +260,7 @@ export const GitLabSyncFields = () => {
{ const { watch } = useFormContext(); - const projectId = watch("destinationConfig.projectId"); + const projectName = watch("destinationConfig.projectName"); const targetEnvironment = watch("destinationConfig.targetEnvironment"); const groupId = watch("destinationConfig.groupId"); const scope = watch("destinationConfig.scope"); @@ -17,7 +17,7 @@ export const GitLabSyncReviewFields = () => { return ( <> {scope} - {projectId} + {projectName} {groupId && {groupId}} {targetEnvironment && ( {targetEnvironment} diff --git a/frontend/src/helpers/secretSyncs.ts b/frontend/src/helpers/secretSyncs.ts index a77732af3..a4eb513f5 100644 --- a/frontend/src/helpers/secretSyncs.ts +++ b/frontend/src/helpers/secretSyncs.ts @@ -75,7 +75,7 @@ export const SECRET_SYNC_MAP: Record {selectedMethod === GitlabConnectionMethod.AccessToken && ( - ( - - onChange(e.target.value)} - /> - - )} - /> + <> + ( + + + + )} + /> + ( + + onChange(e.target.value)} + /> + + )} + /> + )}
@@ -280,10 +318,10 @@ export const GitLabConnectionForm = ({ appConnection, onSubmit: formSubmit }: Pr } > {isRedirecting && selectedMethod === GitlabConnectionMethod.OAuth - ? "Redirecting to Gitlab..." + ? "Redirecting to GitLab..." : isUpdate - ? "Reconnect to Gitlab" - : "Connect to Gitlab"} + ? "Reconnect to GitLab" + : "Connect to GitLab"}