feat: add project audit endpoint#1308
Conversation
There was a problem hiding this comment.
Thanks a lot for this @Sineaggi! Just one small comment.
BTW - It might make sense to separate this into its own module, audit_events.py. Looking at the upstream docs, we also have instance and group audit events, so this could be expanded at a later point, and look something like the variables module:
https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/v4/objects/variables.py
EDIT: I realize now that the current instance-level audit events were put into events.py, but they seem to have their own section in gitlab's api, so moving them together into audit_events.py might still make sense.
Then import the project-specific classes in projects.py.
If you feel like it, you could also add some unit tests for this as a sanity check, using the example responses from your API link as mocks. Have a look at the existing unit tests: https://github.com/python-gitlab/python-gitlab/tree/master/gitlab/tests/objects
Thanks again!
1f5c5bf to
dba3483
Compare
Codecov Report
@@ Coverage Diff @@
## master #1308 +/- ##
==========================================
+ Coverage 80.64% 80.71% +0.06%
==========================================
Files 66 67 +1
Lines 3250 3261 +11
==========================================
+ Hits 2621 2632 +11
Misses 629 629
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
@nejch code moved to |
dba3483 to
868cea9
Compare
868cea9 to
6660dbe
Compare
nejch
left a comment
There was a problem hiding this comment.
Thanks again! Just found a little copy/paste leftover, I can push this.
Similar to #949 but specific to project audit events.
No previous issues for this exist.
The code was tested to verify it works.