diff --git a/lib/Github/Api/User.php b/lib/Github/Api/User.php index e832bd84710..0419c306626 100644 --- a/lib/Github/Api/User.php +++ b/lib/Github/Api/User.php @@ -104,11 +104,14 @@ public function subscriptions($username) * @link http://developer.github.com/v3/repos/ * * @param string $username the username + * @param string $sort the repository order * @return array list of the user repositories */ - public function repositories($username) + public function repositories($username, $sort = 'full_name') { - return $this->get('users/'.rawurlencode($username).'/repos'); + return $this->get('users/'.rawurlencode($username).'/repos', array( + 'sort' => $sort + )); } /**