Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit029695d

Browse files
holysolesJohnVillalovos
authored andcommitted
feat(api): get single project approval rule
1 parent0cb8171 commit029695d

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
classProjectApprovalRuleManager(
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+
defget(
72+
self,id:Union[str,int],lazy:bool=False,**kwargs:Any
73+
)->ProjectApprovalRule:
74+
returncast(ProjectApprovalRule,super().get(id=id,lazy=lazy,**kwargs))
75+
7176

7277
classProjectMergeRequestApproval(SaveMixin,RESTObject):
7378
_id_attr=None

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp