| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 70148c6 commit 284d739
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -160,6 +160,8 @@ def __init__( | |||
| 160 | 160 | """See :class:`~gitlab.v4.objects.NotificationSettingsManager`""" | |
| 161 | 161 | self.projects = objects.ProjectManager(self) | |
| 162 | 162 | """See :class:`~gitlab.v4.objects.ProjectManager`""" | |
| 163 | + self.registry_repositories = objects.RegistryRepositoryManager(self) | ||
| 164 | + """See :class:`~gitlab.v4.objects.RegistryRepositoryManager`""" | ||
| 163 | 165 | self.runners = objects.RunnerManager(self) | |
| 164 | 166 | """See :class:`~gitlab.v4.objects.RunnerManager`""" | |
| 165 | 167 | self.settings = objects.ApplicationSettingsManager(self) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,14 +3,22 @@ | |||
| 3 | 3 | from gitlab import cli | |
| 4 | 4 | from gitlab import exceptions as exc | |
| 5 | 5 | from gitlab.base import RESTManager, RESTObject | |
| 6 | - from gitlab.mixins import DeleteMixin, ListMixin, ObjectDeleteMixin, RetrieveMixin | ||
| 6 | + from gitlab.mixins import ( | ||
| 7 | + DeleteMixin, | ||
| 8 | + GetMixin, | ||
| 9 | + ListMixin, | ||
| 10 | + ObjectDeleteMixin, | ||
| 11 | + RetrieveMixin, | ||
| 12 | + ) | ||
| 7 | 13 | ||
| 8 | 14 | __all__ = [ | |
| 9 | 15 | "GroupRegistryRepositoryManager", | |
| 10 | 16 | "ProjectRegistryRepository", | |
| 11 | 17 | "ProjectRegistryRepositoryManager", | |
| 12 | 18 | "ProjectRegistryTag", | |
| 13 | 19 | "ProjectRegistryTagManager", | |
| 20 | + "RegistryRepository", | ||
| 21 | + "RegistryRepositoryManager", | ||
| 14 | 22 | ] | |
| 15 | 23 | ||
| 16 | 24 | ||
@@ -72,3 +80,17 @@ class GroupRegistryRepositoryManager(ListMixin, RESTManager): | |||
| 72 | 80 | _path = "/groups/{group_id}/registry/repositories" | |
| 73 | 81 | _obj_cls = ProjectRegistryRepository | |
| 74 | 82 | _from_parent_attrs = {"group_id": "id"} | |
| 83 | + | ||
| 84 | + | ||
| 85 | + class RegistryRepository(RESTObject): | ||
| 86 | + _repr_attr = "path" | ||
| 87 | + | ||
| 88 | + | ||
| 89 | + class RegistryRepositoryManager(GetMixin, RESTManager): | ||
| 90 | + _path = "/registry/repositories" | ||
| 91 | + _obj_cls = RegistryRepository | ||
| 92 | + | ||
| 93 | + def get( | ||
| 94 | + self, id: Union[str, int], lazy: bool = False, **kwargs: Any | ||
| 95 | + ) -> RegistryRepository: | ||
| 96 | + return cast(RegistryRepository, super().get(id=id, lazy=lazy, **kwargs)) | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments