lib/Github/Api/Issue/Milestones.php
public function all($username, $repository, array $params = [])
    {
        if (isset($params['state']) && !in_array($params['state'], ['open', 'closed', 'all'])) {
            $params['state'] = 'open';
        }
        if (isset($params['sort']) && !in_array($params['sort'], ['due_date', 'completeness'])) {
            $params['sort'] = 'due_date';
        }
        if (isset($params['direction']) && !in_array($params['direction'], ['asc', 'desc'])) {
            $params['direction'] = 'asc';
        }

        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones', array_merge([
            'page'      => 1,
            'state'     => 'open',
            'sort'      => 'due_date',
            'direction' => 'asc',
        ], $params));
    }
public function all($username, $repository, array $params = [])
    {
        if (isset($params['state']) && !in_array($params['state'], ['open', 'closed', 'all'])) {
            $params['state'] = 'open';
        }
        if (isset($params['sort']) && !in_array($params['sort'], ['due_date', 'completeness'])) {
            $params['sort'] = 'due_date';
        }
        if (isset($params['direction']) && !in_array($params['direction'], ['asc', 'desc'])) {
            $params['direction'] = 'asc';
        }

        return $this->get('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/milestones', array_merge([
            'page'      => 1,
            'state'     => 'open',
            'sort'      => 'due_date',
            'direction' => 'asc',
        ], $params));
    }
public function all ( $ username , $ repository , array $ params = [ ] ) { if ( isset ( $ params [ 'state' ] ) && ! in_array ( $ params [ 'state' ] , [ 'open' , 'closed' , 'all' ] ) ) { $ params [ 'state' ] = 'open' ; } if ( isset ( $ params [ 'sort' ] ) && ! in_array ( $ params [ 'sort' ] , [ 'due_date' , 'completeness' ] ) ) { $ params [ 'sort' ] = 'due_date' ; } if ( isset ( $ params [ 'direction' ] ) && ! in_array ( $ params [ 'direction' ] , [ 'asc' , 'desc' ] ) ) { $ params [ 'direction' ] = 'asc' ; } return $ this -> get ( '/repos/' . rawurlencode ( $ username ) . '/' . rawurlencode ( $ repository ) . '/milestones' , array_merge ( [ 'page' => 1 , 'state' => 'open' , 'sort' => 'due_date' , 'direction' => 'asc' , ] , $ params ) ) ; }
Get all milestones for a repository.

@link https://developer.github.com/v3/issues/milestones/#list-milestones-for-a-repository

@param string $username
@param string $repository
@param array  $params

@return array
Get all milestones for a repository .