Skip to content

Commit 758f876

Browse files
tgerakitisroot
andauthored
Implemented tag search
Co-authored-by: root <[email protected]>
1 parent 16b4dea commit 758f876

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/Api/Repositories.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ public function unprotectBranch($project_id, string $branch)
120120
public function tags($project_id, array $parameters = [])
121121
{
122122
$resolver = $this->createOptionsResolver();
123+
$resolver->setDefined('search')
124+
->setAllowedTypes('search', 'string');
123125

124126
return $this->get($this->getProjectPath($project_id, 'repository/tags'), $resolver->resolve($parameters));
125127
}

tests/Api/RepositoriesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ public function shouldGetTags(): void
157157
->will($this->returnValue($expectedArray))
158158
;
159159

160-
$this->assertEquals($expectedArray, $api->tags(1));
160+
$this->assertEquals($expectedArray, $api->tags(1, ['search' => '^term']));
161161
}
162162

163163
/**

0 commit comments

Comments
 (0)