fix: not able to use other shared envs

This commit is contained in:
Andras Bacsai
2024-01-31 13:40:15 +01:00
parent 5f797ec0ae
commit 52fd7ad571
4 changed files with 34 additions and 2 deletions

View File

@@ -100,6 +100,9 @@ class EnvironmentVariable extends Model
$variable = Str::after($environment_variable, "{$type}.");
$variable = Str::before($variable, '}}');
$variable = Str::of($variable)->trim()->value;
if (!collect(['team', 'project', 'environment'])->contains($type)) {
return $variable;
}
if ($type === 'environment') {
$id = $resource->environment->id;
} else if ($type === 'project') {