diff --git a/src/Api/Groups.php b/src/Api/Groups.php index 8b469322..3c0ee3eb 100644 --- a/src/Api/Groups.php +++ b/src/Api/Groups.php @@ -506,7 +506,14 @@ public function issues($group_id, array $parameters = []) /** * @param int|string $group_id - * @param array $parameters + * @param array $parameters { + * + * @var bool $with_counts Whether or not to include issue and merge request counts. Defaults to false. + * @var bool $include_ancestor_groups Include ancestor groups. Defaults to true. + * @var bool $include_descendant_groups Include descendant groups. Defaults to false. + * @var bool $only_group_labels Toggle to include only group labels or also project labels. Defaults to true. + * @var string $search Keyword to filter labels by. + * } * * @return mixed */ @@ -514,6 +521,21 @@ public function labels($group_id, array $parameters = []) { $resolver = $this->createOptionsResolver(); + $resolver->setDefined('with_counts') + ->setAllowedTypes('with_counts', 'bool'); + + $resolver->setDefined('include_ancestor_groups') + ->setAllowedTypes('include_ancestor_groups', 'bool'); + + $resolver->setDefined('include_descendant_groups') + ->setAllowedTypes('include_descendant_groups', 'bool'); + + $resolver->setDefined('only_group_labels') + ->setAllowedTypes('only_group_labels', 'bool'); + + $resolver->setDefined('search') + ->setAllowedTypes('search', 'string'); + return $this->get('groups/'.self::encodePath($group_id).'/labels', $resolver->resolve($parameters)); } diff --git a/src/Api/Projects.php b/src/Api/Projects.php index 0d0db19d..b7ad32b1 100644 --- a/src/Api/Projects.php +++ b/src/Api/Projects.php @@ -976,7 +976,12 @@ public function events($project_id, array $parameters = []) /** * @param int|string $project_id - * @param array $parameters + * @param array $parameters { + * + * @var bool $with_counts Whether or not to include issue and merge request counts. Defaults to false. + * @var bool $include_ancestor_groups Include ancestor groups. Defaults to true. + * @var string $search Keyword to filter labels by. + * } * * @return mixed */ @@ -984,6 +989,15 @@ public function labels($project_id, array $parameters = []) { $resolver = $this->createOptionsResolver(); + $resolver->setDefined('with_counts') + ->setAllowedTypes('with_counts', 'bool'); + + $resolver->setDefined('include_ancestor_groups') + ->setAllowedTypes('include_ancestor_groups', 'bool'); + + $resolver->setDefined('search') + ->setAllowedTypes('search', 'string'); + return $this->get($this->getProjectPath($project_id, 'labels'), $resolver->resolve($parameters)); }