8000 feat: add project audit endpoint · python-gitlab/python-gitlab@9fd6aff · GitHub
[go: up one dir, main page]

Skip to content

Commit 9fd6aff

Browse files
author
Clayton Walker
committed
feat: add project audit endpoint
1 parent d4e7a03 commit 9fd6aff

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

gitlab/v4/objects/projects.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151
"GroupProjectManager",
5252
"Project",
5353
"ProjectManager",
54+
"ProjectAudit",
55+
"ProjectAuditManager",
5456
"ProjectFork",
5557
"ProjectForkManager",
5658
"ProjectRemoteMirror",
@@ -85,6 +87,17 @@ class GroupProjectManager(ListMixin, RESTManager):
8587
)
8688

8789

90+
class ProjectAudit(RESTObject):
91+
_id_attr = "id"
92+
93+
94+
class ProjectAuditManager(ListMixin, RESTManager):
95+
_path = "/projects/%(project_id)s/audit_events"
96+
_obj_cls = ProjectAudit
97+
_from_parent_attrs = {"project_id": "id"}
98+
_list_filters = ("created_after", "created_before")
99+
100+
88101
class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
89102
_short_print_attr = "path"
90103
_managers = (
@@ -100,6 +113,7 @@ class Project(SaveMixin, ObjectDeleteMixin, RESTObject):
100113
("deployments", "ProjectDeploymentManager"),
101114
("environments", "ProjectEnvironmentManager"),
102115
("events", "ProjectEventManager"),
116+
("audit_events", "ProjectAuditManager"),
103117
("exports", "ProjectExportManager"),
104118
("files", "ProjectFileManager"),
105119
("forks", "ProjectForkManager"),

0 commit comments

Comments
 (0)
0