From b9ee81aa59d72ef046aa4984ae53fea087f65f01 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sun, 6 Jul 2025 13:56:58 -0600 Subject: [PATCH] fix(gitlab): update repository selection to use URL instead of name - Changed the repository selection logic in SaveGitlabProvider and SaveGitlabProviderCompose components to use the repository URL for better accuracy. - Updated the condition for displaying the selected repository in the CheckIcon component to compare against the gitlabPathNamespace instead of the repository name. - Refactored the getGitlabRepositories function to simplify the group name check logic. --- .../application/general/generic/save-gitlab-provider.tsx | 5 +++-- .../compose/general/generic/save-gitlab-provider-compose.tsx | 5 +++-- packages/server/src/utils/providers/gitlab.ts | 4 +--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx index b4f27da74..3b054fc99 100644 --- a/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx +++ b/apps/dokploy/components/dashboard/application/general/generic/save-gitlab-provider.tsx @@ -278,7 +278,7 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => { {repositories?.map((repo) => { return ( { form.setValue("repository", { @@ -299,7 +299,8 @@ export const SaveGitlabProvider = ({ applicationId }: Props) => { { {repositories?.map((repo) => { return ( { form.setValue("repository", { @@ -301,7 +301,8 @@ export const SaveGitlabProviderCompose = ({ composeId }: Props) => { { const groupName = gitlabProvider.groupName?.toLowerCase(); if (groupName) { - const isIncluded = groupName + return groupName .split(",") .some((name) => full_path.toLowerCase().startsWith(name.trim().toLowerCase()), ); - - return isIncluded && kind === "group"; } return kind === "user"; });