Skip to content

Milestone params missing #855

Closed
Closed
@dereuromark

Description

@dereuromark
        /** @var \Github\Api\Repo $repo */
        $repo = $this->gitClient->api('repo');

        $repository = $this->repository;

        return $repo->milestones($this->organization, $repository, ['state' => 'all']);

But:
https://github.com/KnpLabs/php-github-api/blob/master/lib/Github/Api/Repo.php#L596

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

The default is not all but open, so you can never get the closed ones.

I think the code should be:

    /**
     * @param string $username
     * @param string $repository
     * @param array $parameters
     *
     * @return array
     */
    public function milestones($username, $repository, array $parameters = [])
    {
        return $this->get('/repos/'.rawurldecode($username).'/'.rawurldecode($repository).'/milestones', $parameters);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions