mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
fix: correct gitlab check order for conflict
This commit is contained in:
@@ -171,6 +171,14 @@ export const DESTINATION_DUPLICATE_CHECK_MAP: Record<SecretSync, DestinationDupl
|
|||||||
const newTargetEnv = newConfig.targetEnvironment as string | undefined;
|
const newTargetEnv = newConfig.targetEnvironment as string | undefined;
|
||||||
|
|
||||||
const wildcardValues = ["*", ""];
|
const wildcardValues = ["*", ""];
|
||||||
|
|
||||||
|
if (
|
||||||
|
(newConfig.scope as string) === "group"
|
||||||
|
? existingConfig.groupId !== newConfig.groupId
|
||||||
|
: existingConfig.projectId !== newConfig.projectId
|
||||||
|
)
|
||||||
|
return false;
|
||||||
|
|
||||||
// If either has wildcard, it conflicts with any targetEnvironment
|
// If either has wildcard, it conflicts with any targetEnvironment
|
||||||
if (
|
if (
|
||||||
!existingTargetEnv ||
|
!existingTargetEnv ||
|
||||||
@@ -181,12 +189,7 @@ export const DESTINATION_DUPLICATE_CHECK_MAP: Record<SecretSync, DestinationDupl
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return existingTargetEnv === newTargetEnv;
|
||||||
existingTargetEnv === newTargetEnv &&
|
|
||||||
((newConfig.scope as string) === "group"
|
|
||||||
? existingConfig.groupId === newConfig.groupId
|
|
||||||
: existingConfig.projectId === newConfig.projectId)
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
[SecretSync.CloudflarePages]: defaultDuplicateCheck,
|
[SecretSync.CloudflarePages]: defaultDuplicateCheck,
|
||||||
[SecretSync.CloudflareWorkers]: defaultDuplicateCheck,
|
[SecretSync.CloudflareWorkers]: defaultDuplicateCheck,
|
||||||
|
|||||||
Reference in New Issue
Block a user