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: {
|
const getErrorCloneRequirements = (entity: {
|
||||||
repository?: string | null;
|
gitlabRepository?: string | null;
|
||||||
owner?: string | null;
|
gitlabOwner?: string | null;
|
||||||
branch?: string | null;
|
gitlabBranch?: string | null;
|
||||||
|
gitlabPathNamespace?: string | null;
|
||||||
}) => {
|
}) => {
|
||||||
const reasons: string[] = [];
|
const reasons: string[] = [];
|
||||||
const { repository, owner, branch } = entity;
|
const { gitlabBranch, gitlabOwner, gitlabRepository, gitlabPathNamespace } =
|
||||||
|
entity;
|
||||||
|
|
||||||
if (!repository) reasons.push("1. Repository not assigned.");
|
if (!gitlabRepository) reasons.push("1. Repository not assigned.");
|
||||||
if (!owner) reasons.push("2. Owner not specified.");
|
if (!gitlabOwner) reasons.push("2. Owner not specified.");
|
||||||
if (!branch) reasons.push("3. Branch not defined.");
|
if (!gitlabBranch) reasons.push("3. Branch not defined.");
|
||||||
|
if (!gitlabPathNamespace) reasons.push("4. Path namespace not defined.");
|
||||||
|
|
||||||
return reasons;
|
return reasons;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user