|
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)) |
0 commit comments