diff options
author | Nejc Habjan <nejc.habjan@siemens.com> | 2022-07-20 14:53:22 +0200 |
---|---|---|
committer | John Villalovos <john@sodarock.com> | 2022-07-20 07:41:38 -0700 |
commit | 70148c62a3aba16dd8a9c29f15ed16e77c01a247 (patch) | |
tree | ece8cbbc698b3c18a7b5fce4258028418bcb8555 /gitlab/v4 | |
parent | c84379d1c9a681516585dc077ec1a237468b4991 (diff) | |
download | gitlab-70148c62a3aba16dd8a9c29f15ed16e77c01a247.tar.gz |
feat(groups): add support for group-level registry repositories
Diffstat (limited to 'gitlab/v4')
-rw-r--r-- | gitlab/v4/objects/container_registry.py | 7 | ||||
-rw-r--r-- | gitlab/v4/objects/groups.py | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gitlab/v4/objects/container_registry.py b/gitlab/v4/objects/container_registry.py index a144dc1..d9b88bc 100644 --- a/gitlab/v4/objects/container_registry.py +++ b/gitlab/v4/objects/container_registry.py @@ -6,6 +6,7 @@ from gitlab.base import RESTManager, RESTObject from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin, RetrieveMixin __all__ = [ + "GroupRegistryRepositoryManager", "ProjectRegistryRepository", "ProjectRegistryRepositoryManager", "ProjectRegistryTag", @@ -65,3 +66,9 @@ class ProjectRegistryTagManager(DeleteMixin, RetrieveMixin, RESTManager): self, id: Union[str, int], lazy: bool = False, **kwargs: Any ) -> ProjectRegistryTag: return cast(ProjectRegistryTag, super().get(id=id, lazy=lazy, **kwargs)) + + +class GroupRegistryRepositoryManager(ListMixin, RESTManager): + _path = "/groups/{group_id}/registry/repositories" + _obj_cls = ProjectRegistryRepository + _from_parent_attrs = {"group_id": "id"} diff --git a/gitlab/v4/objects/groups.py b/gitlab/v4/objects/groups.py index 84fd600..ae71846 100644 --- a/gitlab/v4/objects/groups.py +++ b/gitlab/v4/objects/groups.py @@ -15,6 +15,7 @@ from .audit_events import GroupAuditEventManager # noqa: F401 from .badges import GroupBadgeManager # noqa: F401 from .boards import GroupBoardManager # noqa: F401 from .clusters import GroupClusterManager # noqa: F401 +from .container_registry import GroupRegistryRepositoryManager # noqa: F401 from .custom_attributes import GroupCustomAttributeManager # noqa: F401 from .deploy_tokens import GroupDeployTokenManager # noqa: F401 from .epics import GroupEpicManager # noqa: F401 @@ -77,6 +78,7 @@ class Group(SaveMixin, ObjectDeleteMixin, RESTObject): packages: GroupPackageManager projects: GroupProjectManager pushrules: GroupPushRulesManager + registry_repositories: GroupRegistryRepositoryManager runners: GroupRunnerManager subgroups: "GroupSubgroupManager" variables: GroupVariableManager |