1
0
Fork 0
mirror of synced 2024-07-04 06:00:53 +12:00

Fix missing params from redeploy event

This commit is contained in:
Jake Barnby 2023-08-17 17:37:52 -04:00
parent 4285d99f08
commit 07c985ebc3
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -1273,7 +1273,8 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
->inject('dbForConsole')
->inject('project')
->inject('gitHub')
->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, GitHub $github) use ($redeployVcs) {
->inject('events')
->action(function (string $functionId, string $deploymentId, string $buildId, Request $request, Response $response, Database $dbForProject, Database $dbForConsole, Document $project, GitHub $github, Event $events) use ($redeployVcs) {
$function = $dbForProject->getDocument('functions', $functionId);
$deployment = $dbForProject->getDocument('deployments', $deploymentId);
@ -1298,6 +1299,10 @@ App::post('/v1/functions/:functionId/deployments/:deploymentId/builds/:buildId')
$redeployVcs($request, $function, $project, $installation, $dbForProject, new Document([]), $github);
$events
->setParam('functionId', $function->getId())
->setParam('deploymentId', $deployment->getId());
$response->noContent();
});