/** * @param \Mrimann\CoMo\Domain\Model\Repository $repository */ protected function processSingleRepository(\Mrimann\CoMo\Domain\Model\Repository $repository) { // prepare local cached clone for remote repositories if we're not on a local repo if ($repository->isLocalRepository() === FALSE) { $workingDirectory = $this->getCachePath($repository); $this->outputLine('-> working directory is: ' . $workingDirectory); $preparationResult = $this->prepareCachedClone($repository, $workingDirectory); if ($preparationResult === TRUE) { $this->outputLine('-> cached clone is ready to rumble...'); } else { $this->outputLine('-> preparing local cache failed somehow, giving up on this repo.'); return; } } else { $this->outputLine('-> OK, a local repository - just using that directory, no clone or pulling needed.'); $workingDirectory = $repository->getUrl(); $this->outputLine('-> working directory is: ' . $workingDirectory); } $lastProcessedHash = $this->extractCommits($repository); if ($lastProcessedHash != '') { $repository->setLastProcessedCommit($lastProcessedHash); $this->repositoryRepository->update($repository); } $this->outputLine('-> finished extracting the commits.'); $this->outputLine('-------------------'); }