Sorry, something went wrong.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #3361 +/- ##
==========================================
+ Coverage 95.75% 95.78% +0.03%
==========================================
Files 100 100
Lines 6125 6170 +45
==========================================
+ Hits 5865 5910 +45
Misses 260 260
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Sorry, something went wrong.
There was a problem hiding this comment.
Adds first-class support for GitLab Service Accounts across instance, group, and project scopes in the python-gitlab v4 object model, including personal access token sub-resources for group/project service accounts, plus docs and unit tests to validate the new endpoints.
Changes:
Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.
Show a summary per file| gitlab/v4/objects/service_accounts.py | Implements instance/group/project service account managers + token sub-resources (create/list/update/delete/rotate) using existing mixins. |
| gitlab/client.py | Exposes instance-level service_accounts manager on the GitLab client (gl.service_accounts). |
| gitlab/v4/objects/projects.py | Adds service_accounts manager typing/import so project.service_accounts is available. |
| tests/unit/objects/test_service_accounts.py | Adds unit tests for service account operations and token sub-resource operations across instance/group/project levels. |
| docs/gl_objects/service_accounts.rst | New documentation page covering usage for all scopes and token sub-resources. |
| docs/api-objects.rst | Registers the new service accounts documentation page in the API objects docs index. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
|
Also, I'm okay with this as a follow-up or updating this commit. It would be good to update gitlab/mixins.py the RotateMixin.rotate() method and the @cli.register_custom_action decorator. Same for ObjectRotateMixin Thanks! |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Thanks @syphernl
Sorry, something went wrong.
Changes
Extends service account support to cover all API levels and adds missing CRUD operations. Closes #2812. Supersedes #3109.
Instance-level service accounts (gl.service_accounts)
Group-level service accounts (group.service_accounts)
list, create, delete, rotate — mirrors group access tokens
Project-level service accounts (project.service_accounts)
Usage
Notes
Documentation and testing