mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
refactor: use gitlab properties from error clone requirements
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user