22GitLab API:
33https://docs.gitlab.com/ee/api/audit_events.html
44"""
5+ import warnings
56
67from gitlab .base import RESTManager , RESTObject
78from gitlab .mixins import RetrieveMixin
1112 "AuditEventManager" ,
1213 "GroupAuditEvent" ,
1314 "GroupAuditEventManager" ,
15+ "ProjectAuditEvent" ,
16+ "ProjectAuditEventManager" ,
1417 "ProjectAudit" ,
1518 "ProjectAuditManager" ,
1619]
@@ -37,12 +40,36 @@ class GroupAuditEventManager(RetrieveMixin, RESTManager):
3740 _list_filters = ("created_after" , "created_before" )
3841
3942
40- class ProjectAudit (RESTObject ):
43+ class ProjectAuditEvent (RESTObject ):
4144 _id_attr = "id"
4245
46+ def __init_subclass__ (self ):
47+ warnings .warn (
48+ "This class has been renamed to ProjectAuditEvent "
49+ "and will be removed in a future release." ,
50+ DeprecationWarning ,
51+ 2 ,
52+ )
4353
44- class ProjectAuditManager (RetrieveMixin , RESTManager ):
54+
55+ class ProjectAuditEventManager (RetrieveMixin , RESTManager ):
4556 _path = "/projects/%(project_id)s/audit_events"
46- _obj_cls = ProjectAudit
57+ _obj_cls = ProjectAuditEvent
4758 _from_parent_attrs = {"project_id" : "id" }
4859 _list_filters = ("created_after" , "created_before" )
60+
61+ def __init_subclass__ (self ):
62+ warnings .warn (
63+ "This class has been renamed to ProjectAuditEventManager "
64+ "and will be removed in a future release." ,
65+ DeprecationWarning ,
66+ 2 ,
67+ )
68+
69+
70+ class ProjectAudit (ProjectAuditEvent ):
71+ pass
72+
73+
74+ class ProjectAuditManager (ProjectAuditEventManager ):
75+ pass
0 commit comments