Skip to content

Commit 50ef583

Browse files
committed
Adding project stats.
Fixes #967.
1 parent 3e2d694 commit 50ef583

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gitlab/v4/objects.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3997,6 +3997,16 @@ class ProjectImportManager(GetWithoutIdMixin, RESTManager):
39973997
_from_parent_attrs = {"project_id": "id"}
39983998

39993999

4000+
class ProjectAdditionalStatistics(RefreshMixin, RESTObject):
4001+
_id_attr = None
4002+
4003+
4004+
class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager):
4005+
_path = "/projects/%(project_id)s/statistics"
4006+
_obj_cls = ProjectAdditionalStatistics
4007+
_from_parent_attrs = {"project_id": "id"}
4008+
4009+
40004010
class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
40014011
_short_print_attr = "path"
40024012
_managers = (
@@ -4042,6 +4052,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
40424052
("variables", "ProjectVariableManager"),
40434053
("wikis", "ProjectWikiManager"),
40444054
("clusters", "ProjectClusterManager"),
4055+
("additionalstatistics", "ProjectAdditionalStatisticsManager"),
40454056
)
40464057

40474058
@cli.register_custom_action("Project", ("submodule", "branch", "commit_sha"))

0 commit comments

Comments
 (0)