Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
kmelkez opened this issue Feb 3, 2025 · 0 comments
Open

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

kmelkez opened this issue Feb 3, 2025 · 0 comments

Comments

@kmelkez
Copy link

kmelkez commented Feb 3, 2025

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 kmelkez changed the title Missing sort parameters in branches() method Missing sort parameters in src/Api/Repositories::branches() method Feb 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant