diff --git a/lib/Github/Api/Repo.php b/lib/Github/Api/Repo.php index 0b7deab20ef..a7fc5ba0e8c 100644 --- a/lib/Github/Api/Repo.php +++ b/lib/Github/Api/Repo.php @@ -37,6 +37,20 @@ public function find($keyword, array $params) return $this->get('legacy/repos/search/'.urlencode($keyword), array_merge(array('start_page' => 1), $params)); } + /** + * List all repositories for an organization + * @link http://developer.github.com/v3/repos/#list-organization-repositories + * + * @param string $organization the name of the organization + * @param array $params + * + * @return array list of organization repositories + */ + public function org($organization, array $params = array()) + { + return $this->get('orgs/'.$organization.'/repos', array_merge(array('start_page' => 1), $params)); + } + /** * Get extended information about a repository by its username and repository name * @link http://developer.github.com/v3/repos/