refactor(vcs): reduce nested code
This commit is contained in:
parent
9d6595f85d
commit
8e348dbd92
|
@ -46,7 +46,10 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
|
|||
try {
|
||||
$resourceType = $resource->getAttribute('resourceType');
|
||||
|
||||
if ($resourceType === "function") {
|
||||
if ($resourceType !== "function") {
|
||||
continue;
|
||||
}
|
||||
|
||||
$projectId = $resource->getAttribute('projectId');
|
||||
$project = Authorization::skip(fn () => $dbForConsole->getDocument('projects', $projectId));
|
||||
$dbForProject = $getProjectDB($project);
|
||||
|
@ -246,7 +249,6 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
|
|||
$queueForBuilds->trigger(); // must trigger here so that we create a build for each function
|
||||
|
||||
//TODO: Add event?
|
||||
}
|
||||
} catch (Throwable $e) {
|
||||
$errors[] = $e->getMessage();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue