Use function getLatestBuild

This commit is contained in:
Vincent Vermeulen 2017-10-05 17:43:33 +02:00
parent 5a7d145c94
commit 9b198a128e

View file

@ -73,7 +73,8 @@ class ScheduleBuildCommand extends Command
/** @var Project $project */
foreach ($projects as $project) {
$latestBuild = $this->buildStore->getByProjectId($project->getId(), 1);
$latestBuild = $this->buildStore->getLatestBuilds($project->getId(), 1);
if ($latestBuild['count'] > 0) {
/** @var Build $build */
$build = $latestBuild['items'][0];