Repository navigation
feat(users): add support for current user OAuth applications - #3458
Open
flynn-eye wants to merge 1 commit into
python-gitlab:main from
flynn-eye:codex/current-user-applications
Open
Conversation
Copy link
Copy Markdown
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 /applications endpoint, so these could not be managed without a custom manager (see #3451 ).
This adds CurrentUserApplication / CurrentUserApplicationManager, exposed as gl.user.applications, following the existing gl.user.emails / gl.user.keys pattern:
create requires name, redirect_uri, scopes; optional confidential
list, get, delete
update / save() with optional name and scopes
gl.auth()
app = gl.user.applications.create(
{"name": "my_app", "redirect_uri": "http://app.url", "scopes": "read_user"}
)
app.name = "renamed"
app.save()
app.delete()
The manager is also picked up by the CLI as gitlab current-user-application {list,get,create,update,delete}.
Closes #3451
Documentation and testing
- Documentation in the matching docs section (
docs/gl_objects/users.rst)
- Unit tests (
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 on gitlab/, the rst pre-commit hooks, and sphinx-build -n -W all pass. I did not run the functional tests against a live GitLab 19 instance.
feat(users): add support for current user OAuth applications
b0b82bc
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 <noreply@anthropic.com>
Copy link
Copy Markdown
|
✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.79%. Comparing base (8daa940 ) to head (b0b82bc ).
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:
- ❄️ Test Analytics : Detect flaky tests, report on failures, and find test suite problems.
|
This branch has not been deployed
No deployments
Sign up for free
to join this conversation on GitHub .
Already have an account?
Sign in to comment
Labels
None yet
1 participant