Ejemplo n.º 1
0
 public function getContributorNames(Entity\Repo $repo)
 {
     try {
         $contributors = $this->github->getRepoApi()->getRepoContributors($repo->getUsername(), $repo->getName());
     } catch (\Github_HttpClient_Exception $e) {
         if (404 == $e->getCode()) {
             return array();
         }
         throw $e;
     }
     $names = array();
     foreach ($contributors as $contributor) {
         if ($repo->getUsername() != $contributor['login']) {
             $names[] = $contributor['login'];
         }
     }
     return $names;
 }
Ejemplo n.º 2
0
 public function getRepoDir(RepoEntity $repo)
 {
     return $this->dir . '/' . $repo->getUsername() . '/' . $repo->getName();
 }