summaryrefslogtreecommitdiff
path: root/gitlab/v4/objects.py
diff options
context:
space:
mode:
authorMitar <mitar.git@tnode.com>2019-12-09 23:51:08 -0800
committerMitar <mitar.git@tnode.com>2019-12-12 20:43:44 -0800
commit482e57ba716c21cd7b315e5803ecb3953c479b33 (patch)
tree89d67024e46cbdcbbb735ae44ec8ba643942243f /gitlab/v4/objects.py
parentdb0b00a905c14d52eaca831fcc9243f33d2f092d (diff)
downloadgitlab-482e57ba716c21cd7b315e5803ecb3953c479b33.tar.gz
feat: access project's issues statistics
Fixes #966
Diffstat (limited to 'gitlab/v4/objects.py')
-rw-r--r--gitlab/v4/objects.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/gitlab/v4/objects.py b/gitlab/v4/objects.py
index e957a36..91b946d 100644
--- a/gitlab/v4/objects.py
+++ b/gitlab/v4/objects.py
@@ -4007,6 +4007,16 @@ class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager):
_from_parent_attrs = {"project_id": "id"}
+class ProjectIssuesStatistics(RefreshMixin, RESTObject):
+ _id_attr = None
+
+
+class ProjectIssuesStatisticsManager(GetWithoutIdMixin, RESTManager):
+ _path = "/projects/%(project_id)s/issues_statistics"
+ _obj_cls = ProjectIssuesStatistics
+ _from_parent_attrs = {"project_id": "id"}
+
+
class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = "path"
_managers = (
@@ -4053,6 +4063,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
("wikis", "ProjectWikiManager"),
("clusters", "ProjectClusterManager"),
("additionalstatistics", "ProjectAdditionalStatisticsManager"),
+ ("issuesstatistics", "ProjectIssuesStatisticsManager"),
)
@cli.register_custom_action("Project", ("submodule", "branch", "commit_sha"))