Client icon indicating copy to clipboard operation
Client copied to clipboard

Missing sort parameters in src/Api/Repositories::branches() method

Open kmelkez opened this issue 9 months ago • 0 comments

According to the Open API documentation https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/api/openapi/openapi.yaml

Endpoint /projects/{id}/repository/branches can take useful arguments as sort=updated_desc

I tested a quick implementation in src/Api/Repositories.php and it works well :

public function branches($project_id, array $parameters = [])
    {
        $resolver = $this->createOptionsResolver();
        $resolver->setDefined('search')
            ->setAllowedTypes('search', 'string');
	
	$resolver->setDefined('sort')
            ->setAllowedTypes('sort', 'string');

Any reasons why it's not implemented ?

kmelkez avatar Feb 03 '25 22:02 kmelkez