Client icon indicating copy to clipboard operation
Client copied to clipboard

[11.15] Added functionality to handle access tokens

Open inuitviking opened this issue 1 year ago • 5 comments

Closes #799 Closes #798

This pull request includes:

  • A new method in AbstractApi: getGroupPath (group equivalent to getProjectPath)
  • New methods in Groups:
    • groupAccessTokens
    • groupAccessToken
    • createGroupAccessToken
    • deleteGroupAccessToken
    • rotateGroupAccessToken
  • New methods in Projects
    • rotateProjectAccessToken
  • Tests for above methods

The above methods are almost 1:1 to the same functionality available for project access tokens, making this pull request super easy to make. Tested with the available test tools seen in this project (albeit locally) and against my company's private group (with Premium). Works as expected in that regard.

The rotate methods simply rotate the specified access token, and returns the resulting array, containing also the token itself; this is handy for automatically updating variables in Gitlab containing these tokens.

inuitviking avatar Mar 06 '24 13:03 inuitviking

@inuitviking Hello! Thanks for contributing on this project! However I am no longer involved with this, I think it is still under my username but I haven't used or look at this for a good few years now. I believe @GrahamCampbell is a maintainer these days.

m4tthumphrey avatar Mar 06 '24 13:03 m4tthumphrey

@inuitviking Hello! Thanks for contributing on this project! However I am no longer involved with this, I think it is still under my username but I haven't used or look at this for a good few years now. I believe @GrahamCampbell is a maintainer these days.

Ah, sorry for bothering you! Thank you for mentioning Graham.

inuitviking avatar Mar 06 '24 13:03 inuitviking

Thanks for the PR. I've re-triggered the CI, and will try to review this shortly, for the 11.15.0 release. I wasn't able to allocate the time to get this into today's 11.14.0 release I'm afraid.

GrahamCampbell avatar Mar 17 '24 21:03 GrahamCampbell

I have added some more things since, as I got more requests for specific features. Will update tomorrow (Monday)

inuitviking avatar Mar 17 '24 22:03 inuitviking

I have added some more things since, as I got more requests for specific features. Will update tomorrow (Monday)

By the way, and excuse my late comment, this has been done on that Monday.

inuitviking avatar Mar 26 '24 12:03 inuitviking