-
-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[11.15] Added functionality to handle access tokens #800
base: 11.15
Are you sure you want to change the base?
Conversation
This is similar to getProjectPath, but for groups.
Adds the same functions currently available for project access tokens, but for groups.
@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. |
The require for PHP versions was inaccurate, as this project actually only supports PHP 8.1 and above.
This has been added to make PHPStan happi. :)
It added tabs instead of spaces. :(
PHPDocs were faulty (according to PHPStan) in Authentication and ExceptionThrower. The `make test` command should no longer fail.
It appears to be very picky; I guess this is good practice.
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. |
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. |
* | ||
* @return mixed | ||
*/ | ||
public function rotateProjectAccessToken(string|int $project_id, string|int $token_id, string $expiry = ''): mixed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Crosslinking both (open) GitHub pull requests with the same method/functionality:
Closes #799
Closes #798
This pull request includes:
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.