Add endpoint for self personal access token creation in UserApi #1260
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.
Fixes #1257.
This PR adds:
POST /user/personal_access_tokens
endpoint.k8s_proxy
scope.Basically, the update reuses the existing
createPersonalAccessTokenOrImpersonationToken
function and updating it to use the/user/personal_access_tokens
endpoint whenuserIdOrUsername
is not defined.Link to the documentation: https://docs.gitlab.com/api/user_tokens/#create-a-personal-access-token
👉 Unrelated to this PR, but the build was failing by default on Windows due to a special quote character in
Setting.java
:gitlab4j-api/gitlab4j-models/src/main/java/org/gitlab4j/api/models/Setting.java
Line 1134 in 4225df5
If needed, I can include a fix for this in this PR or submit it separately.