/** * @param Build $build * @param AbstractProvider $scm */ protected function setParentBuild(Build $build, AbstractProvider $scm) { $revisionNo = $build->getRevisionNumber(); $revisions = $scm->getHistory($revisionNo); if (count($revisions)) { $parent = $this->buildRepository->getParentBuild($revisions); if ($parent) { $build->setParent($parent); } } }