fix: secret environment flow bugs (#3817)

This commit is contained in:
Nivedin
2024-02-10 20:22:10 +05:30
committed by GitHub
parent ecca3d2032
commit 41bad1f3dc
7 changed files with 49 additions and 15 deletions

View File

@@ -117,6 +117,21 @@ export class SecretEnvironmentService extends Service {
this.secretEnvironments.delete(oldID)
}
/**
*
* @param id ID of the environment
* @param key Key of the variable to check the value exists
* @returns true if the key has a secret value
*/
public hasSecretValue(id: string, key: string) {
return (
this.secretEnvironments.has(id) &&
this.secretEnvironments
.get(id)!
.some((secretVar) => secretVar.key === key && secretVar.value !== "")
)
}
/**
* Used to update the value of a secret environment variable.
*/