Example #1
0
 public function updateCommits(Entity\Bundle $bundle)
 {
     $this->output->write(' commits');
     try {
         $commits = $this->github->getCommitApi()->getBranchCommits($bundle->getUsername(), $bundle->getName(), 'HEAD');
     } catch (\Github_HttpClient_Exception $e) {
         if (404 == $e->getCode()) {
             return false;
         }
         throw $e;
     }
     if (empty($commits)) {
         return false;
     }
     $bundle->setLastCommits(array_slice($commits, 0, 30));
     return $bundle;
 }