feat: add code owner approval as attribute#1437
Conversation
The python API was missing the field code_owner_approval_required as implemented in the GitLab REST API.
|
A test for this would be awesome. Maybe in the functional tests. For an example see: https://github.com/python-gitlab/python-gitlab/blob/master/tools/functional/api/test_projects.py#L190 |
Codecov Report
@@ Coverage Diff @@
## master #1437 +/- ##
=======================================
Coverage 80.24% 80.24%
=======================================
Files 73 73
Lines 4064 4064
=======================================
Hits 3261 3261
Misses 803 803
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@JohnVillalovos in this case I think we won't be able to test it in functional tests, as it's a premium feature and our CE docker container won't return the attribute. Edit: I'll merge this for now John, as writing tests for all attributes would get tedious unless we need to test something specific around their behavior (like our list issue), but we should definitely think about how to maintain these hardcoded attributes better. Since GitLab doesn't have an OpenAPI spec, maybe by periodically scanning the markdown tables from their docs for required/optional args for all endpoints and checking against our tuples, lol |
Add
ProjectProtectedBranchManager.code_owner_approval_requiredto mimick GitLab API documentation:Fixes #1436