Skip to content

Commit 029695d

Browse files
holysolesJohnVillalovos
authored andcommitted
feat(api): get single project approval rule
1 parent 0cb8171 commit 029695d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

gitlab/v4/objects/merge_request_approvals.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
CRUDMixin,
88
DeleteMixin,
99
GetWithoutIdMixin,
10-
ListMixin,
1110
ObjectDeleteMixin,
11+
RetrieveMixin,
1212
SaveMixin,
1313
UpdateMethod,
1414
UpdateMixin,
@@ -58,7 +58,7 @@ class ProjectApprovalRule(SaveMixin, ObjectDeleteMixin, RESTObject):
5858

5959

6060
class ProjectApprovalRuleManager(
61-
ListMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTManager
61+
RetrieveMixin, CreateMixin, UpdateMixin, DeleteMixin, RESTManager
6262
):
6363
_path = "/projects/{project_id}/approval_rules"
6464
_obj_cls = ProjectApprovalRule
@@ -68,6 +68,11 @@ class ProjectApprovalRuleManager(
6868
optional=("user_ids", "group_ids", "protected_branch_ids", "usernames"),
6969
)
7070

71+
def get(
72+
self, id: Union[str, int], lazy: bool = False, **kwargs: Any
73+
) -> ProjectApprovalRule:
74+
return cast(ProjectApprovalRule, super().get(id=id, lazy=lazy, **kwargs))
75+
7176

7277
class ProjectMergeRequestApproval(SaveMixin, RESTObject):
7378
_id_attr = None

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy