Skip to content

Commit 39aeae1

Browse files
principism1guelpf
authored andcommitted
Added attributes for groups projects
- with_issues_enabled - with_merge_requests_enabled - with_shared - with_shared - with_custom_attributes
1 parent 51c647d commit 39aeae1

File tree

1 file changed

+34
-9
lines changed

1 file changed

+34
-9
lines changed

lib/Gitlab/Api/Groups.php

Lines changed: 34 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -160,15 +160,20 @@ public function removeMember($group_id, $user_id)
160160
* @param $id
161161
* @param array $parameters (
162162
*
163-
* @var bool $archived Limit by archived status.
164-
* @var string $visibility Limit by visibility public, internal, or private.
165-
* @var string $order_by Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields.
166-
* Default is created_at.
167-
* @var string $sort Return projects sorted in asc or desc order. Default is desc.
168-
* @var string $search Return list of authorized projects matching the search criteria.
169-
* @var bool $simple Return only the ID, URL, name, and path of each project.
170-
* @var bool $owned Limit by projects owned by the current user.
171-
* @var bool $starred Limit by projects starred by the current user.
163+
* @var bool $archived Limit by archived status.
164+
* @var string $visibility Limit by visibility public, internal, or private.
165+
* @var string $order_by Return projects ordered by id, name, path, created_at, updated_at, or last_activity_at fields.
166+
* Default is created_at.
167+
* @var string $sort Return projects sorted in asc or desc order. Default is desc.
168+
* @var string $search Return list of authorized projects matching the search criteria.
169+
* @var bool $simple Return only the ID, URL, name, and path of each project.
170+
* @var bool $owned Limit by projects owned by the current user.
171+
* @var bool $starred Limit by projects starred by the current user.
172+
* @var bool $with_issues_enabled Limit by projects with issues feature enabled. Default is false.
173+
* @var bool $with_merge_requests_enabled Limit by projects with merge requests feature enabled. Default is false.
174+
* @var bool $with_shared Include projects shared to this group. Default is true.
175+
* @var bool $include_subgroups Include projects in subgroups of this group. Default is false.
176+
* @var bool $with_custom_attributes Include custom attributes in response (admins only).
172177
* )
173178
*
174179
* @return mixed
@@ -206,6 +211,26 @@ public function projects($id, array $parameters = [])
206211
->setAllowedTypes('starred', 'bool')
207212
->setNormalizer('starred', $booleanNormalizer)
208213
;
214+
$resolver->setDefined('with_issues_enabled')
215+
->setAllowedTypes('with_issues_enabled', 'bool')
216+
->setNormalizer('with_issues_enabled', $booleanNormalizer)
217+
;
218+
$resolver->setDefined('with_merge_requests_enabled')
219+
->setAllowedTypes('with_merge_requests_enabled', 'bool')
220+
->setNormalizer('with_merge_requests_enabled', $booleanNormalizer)
221+
;
222+
$resolver->setDefined('with_shared')
223+
->setAllowedTypes('with_shared', 'bool')
224+
->setNormalizer('with_shared', $booleanNormalizer)
225+
;
226+
$resolver->setDefined('include_subgroups')
227+
->setAllowedTypes('include_subgroups', 'bool')
228+
->setNormalizer('include_subgroups', $booleanNormalizer)
229+
;
230+
$resolver->setDefined('with_custom_attributes')
231+
->setAllowedTypes('with_custom_attributes', 'bool')
232+
->setNormalizer('with_custom_attributes', $booleanNormalizer)
233+
;
209234

210235
return $this->get('groups/'.$this->encodePath($id).'/projects', $resolver->resolve($parameters));
211236
}

0 commit comments

Comments
 (0)