1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00

refactor(vcs): reduce nested code

This commit is contained in:
Steven Nguyen 2024-03-10 21:53:57 +01:00
parent 9d6595f85d
commit 8e348dbd92
No known key found for this signature in database

View file

@ -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();
}