Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

refactor: rename 'name' to 'fullName' in GitLab group structure across backend and frontend

Victor Santosde521e6e8d11
diff --git a/backend/src/server/routes/v1/app-connection-routers/gitlab-connection-router.ts b/backend/src/server/routes/v1/app-connection-routers/gitlab-connection-router.ts
index 034b1d7a64..b932088e99 100644
--- a/backend/src/server/routes/v1/app-connection-routers/gitlab-connection-router.ts
+++ b/backend/src/server/routes/v1/app-connection-routers/gitlab-connection-router.ts
@@ -72,7 +72,7 @@ export const registerGitLabConnectionRouter = async (server: FastifyZodProvider)
200: z
.object({
id: z.string(),
- name: z.string()
+ fullName: z.string()
})
.array()
}
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 9499d6bf2e..ca0833e40b 100644
--- a/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts
+++ b/backend/src/services/app-connection/gitlab/gitlab-connection-fns.ts
@@ -367,7 +367,7 @@ export const listGitLabGroups = async ({
return groups.map((group) => ({
id: group.id.toString(),
- name: group.name
+ fullName: group.fullName
}));
} catch (error: unknown) {
if (error instanceof GitbeakerRequestError) {
diff --git a/backend/src/services/app-connection/gitlab/gitlab-connection-types.ts b/backend/src/services/app-connection/gitlab/gitlab-connection-types.ts
index 73c3d7a467..27d29ec056 100644
--- a/backend/src/services/app-connection/gitlab/gitlab-connection-types.ts
+++ b/backend/src/services/app-connection/gitlab/gitlab-connection-types.ts
@@ -52,5 +52,5 @@ export type TGitLabRefreshTokenCredentials = {
export interface TGitLabGroup {
id: string;
- name: string;
+ fullName: string;
}
diff --git a/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConfigFields/GitLabDataSourceConfigFields.tsx b/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConfigFields/GitLabDataSourceConfigFields.tsx
index d36f0553d4..20c1c6f066 100644
--- a/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConfigFields/GitLabDataSourceConfigFields.tsx
+++ b/frontend/src/components/secret-scanning/forms/SecretScanningDataSourceConfigFields/GitLabDataSourceConfigFields.tsx
@@ -190,13 +190,13 @@ export const GitLabDataSourceConfigFields = () => {
const group = newValue as SingleValue<TGitLabGroup>;
onChange(group ? Number.parseInt(group.id, 10) : null);
- setValue("config.groupName", group?.name ?? "");
+ setValue("config.groupName", group?.fullName ?? "");
setValue("config.includeProjects", ["*"]);
}}
options={groups}
placeholder="Select group..."
- getOptionLabel={(option) => option.name}
- getOptionValue={(option) => option.name}
+ getOptionLabel={(option) => option.fullName}
+ getOptionValue={(option) => option.id}
/>
</FormControl>
)}
diff --git a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
index fe73ea5d50..81ed815747 100644
--- a/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
+++ b/frontend/src/components/secret-syncs/forms/SecretSyncDestinationFields/GitLabSyncFields.tsx
@@ -153,12 +153,12 @@ export const GitLabSyncFields = () => {
onChange((option as SingleValue<TGitLabGroup>)?.id ?? "");
setValue(
"destinationConfig.groupName",
- (option as SingleValue<TGitLabGroup>)?.name ?? ""
+ (option as SingleValue<TGitLabGroup>)?.fullName ?? ""
);
}}
options={groups}
placeholder="Select a group..."
- getOptionLabel={(option) => option.name}
+ getOptionLabel={(option) => option.fullName}
getOptionValue={(option) => option.id}
/>
</FormControl>
diff --git a/frontend/src/hooks/api/appConnections/gitlab/types.ts b/frontend/src/hooks/api/appConnections/gitlab/types.ts
index 7d2699c75a..2e48896ab7 100644
--- a/frontend/src/hooks/api/appConnections/gitlab/types.ts
+++ b/frontend/src/hooks/api/appConnections/gitlab/types.ts
@@ -5,7 +5,7 @@ export type TGitLabProject = {
export type TGitLabGroup = {
id: string;
- name: string;
+ fullName: string;
};
export enum GitLabAccessTokenType {