Repository navigation
Conversation
Add CurrentUserApplicationManager for the GitLab 19.0 User Applications API (/user/applications), exposed as gl.user.applications. Closes python-gitlab#3451 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3458 +/- ##
=======================================
Coverage 95.78% 95.79%
=======================================
Files 100 100
Lines 6172 6180 +8
=======================================
+ Hits 5912 5920 +8
Misses 260 260
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
GitLab 19.0 added a User Applications API (
/user/applications) for OAuth applications owned by the authenticated user. python-gitlab only maps the instance-wide/applicationsendpoint, so these could not be managed without a custom manager (see #3451).This adds
CurrentUserApplication/CurrentUserApplicationManager, exposed asgl.user.applications, following the existinggl.user.emails/gl.user.keyspattern:createrequiresname,redirect_uri,scopes; optionalconfidentiallist,get,deleteupdate/save()with optionalnameandscopesThe manager is also picked up by the CLI as
gitlab current-user-application {list,get,create,update,delete}.Closes #3451
Documentation and testing
docs/gl_objects/users.rst)tests/unit/objects/test_current_user_applications.py; create and update assert the request JSON body)Locally:
pytest tests/unit(727 passed, 3 skipped), black, isort, flake8, mypy, pylint ongitlab/, the rst pre-commit hooks, andsphinx-build -n -Wall pass. I did not run the functional tests against a live GitLab 19 instance.