From 22b675373a4b85330619a0ce0d23693a5b76c538 Mon Sep 17 00:00:00 2001 From: Mauricio Siu <47042324+Siumauricio@users.noreply.github.com> Date: Sat, 7 Sep 2024 00:27:43 -0600 Subject: [PATCH] refactor: use gitlab properties from error clone requirements --- apps/dokploy/server/utils/providers/gitlab.ts | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/dokploy/server/utils/providers/gitlab.ts b/apps/dokploy/server/utils/providers/gitlab.ts index 04babc51..5d3f12c5 100644 --- a/apps/dokploy/server/utils/providers/gitlab.ts +++ b/apps/dokploy/server/utils/providers/gitlab.ts @@ -61,16 +61,19 @@ export const haveGitlabRequirements = (gitlabProvider: Gitlab) => { }; const getErrorCloneRequirements = (entity: { - repository?: string | null; - owner?: string | null; - branch?: string | null; + gitlabRepository?: string | null; + gitlabOwner?: string | null; + gitlabBranch?: string | null; + gitlabPathNamespace?: string | null; }) => { const reasons: string[] = []; - const { repository, owner, branch } = entity; + const { gitlabBranch, gitlabOwner, gitlabRepository, gitlabPathNamespace } = + entity; - if (!repository) reasons.push("1. Repository not assigned."); - if (!owner) reasons.push("2. Owner not specified."); - if (!branch) reasons.push("3. Branch not defined."); + if (!gitlabRepository) reasons.push("1. Repository not assigned."); + if (!gitlabOwner) reasons.push("2. Owner not specified."); + if (!gitlabBranch) reasons.push("3. Branch not defined."); + if (!gitlabPathNamespace) reasons.push("4. Path namespace not defined."); return reasons; };