Skip to content

Commit

Permalink
feat: adding project stats
Browse files Browse the repository at this point in the history
Fixes #967
  • Loading branch information
mitar committed Dec 13, 2019
1 parent 3e2d694 commit db0b00a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gitlab/v4/objects.py
Expand Up @@ -3997,6 +3997,16 @@ class ProjectImportManager(GetWithoutIdMixin, RESTManager):
_from_parent_attrs = {"project_id": "id"}


class ProjectAdditionalStatistics(RefreshMixin, RESTObject):
_id_attr = None


class ProjectAdditionalStatisticsManager(GetWithoutIdMixin, RESTManager):
_path = "/projects/%(project_id)s/statistics"
_obj_cls = ProjectAdditionalStatistics
_from_parent_attrs = {"project_id": "id"}


class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
_short_print_attr = "path"
_managers = (
Expand Down Expand Up @@ -4042,6 +4052,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
("variables", "ProjectVariableManager"),
("wikis", "ProjectWikiManager"),
("clusters", "ProjectClusterManager"),
("additionalstatistics", "ProjectAdditionalStatisticsManager"),
)

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

0 comments on commit db0b00a

Please sign in to comment.