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

feat: add project audit endpoint#1308

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

Sineaggi
Copy link

Similar to#949 but specific toproject audit events.

No previous issues for this exist.

The code was tested to verify it works.

nejch reacted with thumbs up emoji
Copy link
Member

@nejchnejch left a comment
edited
Loading

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

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 intoevents.py, but they seem to have their own section in gitlab's api, so moving them together intoaudit_events.py might still make sense.

Then import the project-specific classes inprojects.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!

@SineaggiSineaggiforce-pushed theadd-project-audit-endpoint branch from1f5c5bf todba3483CompareFebruary 19, 2021 21:04
@codecov-io
Copy link

codecov-io commentedFeb 19, 2021
edited
Loading

Codecov Report

Merging#1308 (6660dbe) intomaster (d4e7a03) willincrease coverage by0.06%.
The diff coverage is100.00%.

Impacted file tree graph

@@            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
FlagCoverage Δ
unit80.71% <100.00%> (+0.06%)⬆️

Flags with carried forward coverage won't be shown.Click here to find out more.

Impacted FilesCoverage Δ
gitlab/v4/objects/audit_events.py100.00% <100.00%> (ø)
gitlab/v4/objects/projects.py69.09% <100.00%> (+0.11%)⬆️

Continue to review full report at Codecov.

Legend -Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing data
Powered byCodecov. Last updated4e7a03...6660dbe. Read thecomment docs.

@SineaggiSineaggi requested a review fromnejchFebruary 19, 2021 21:05
@Sineaggi
Copy link
Author

@nejch code moved toaudit_events.py, moved toRetrieveMixin, added tests that execute both .get() and .list()

@SineaggiSineaggiforce-pushed theadd-project-audit-endpoint branch fromdba3483 to868cea9CompareFebruary 19, 2021 21:49
@SineaggiSineaggiforce-pushed theadd-project-audit-endpoint branch from868cea9 to6660dbeCompareFebruary 19, 2021 21:55
Copy link
Member

@nejchnejch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

Thanks again! Just found a little copy/paste leftover, I can push this.

Sineaggi reacted with thumbs up emoji
@nejchnejch merged commit0c5a23e intopython-gitlab:masterFeb 20, 2021
@SineaggiSineaggi deleted the add-project-audit-endpoint branchFebruary 20, 2021 20:14
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@nejchnejchnejch approved these changes

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

3 participants
@Sineaggi@codecov-io@nejch

[8]ページ先頭

©2009-2025 Movatter.jp