Skip to content

Commit abd7cd0

Browse files
author
Vladimir Kuznichenkov
committed
Add pagination to load branches
1 parent 3b116c1 commit abd7cd0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/Gitlab/Api/Repositories.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ class Repositories extends AbstractApi
44
{
55
/**
66
* @param int $project_id
7+
* @param array $parameters
78
* @return mixed
89
*/
9-
public function branches($project_id)
10+
public function branches($project_id, array $parameters = [])
1011
{
11-
return $this->get($this->getProjectPath($project_id, 'repository/branches'));
12+
$resolver = $this->createOptionsResolver();
13+
$resolver->setDefined('query');
14+
15+
return $this->get($this->getProjectPath($project_id, 'repository/branches'), $resolver->resolve($parameters));
1216
}
1317

1418
/**

0 commit comments

Comments
 (0)