gitlabform icon indicating copy to clipboard operation
gitlabform copied to clipboard

Support `job_token_scope` configuration

Open hertzsprung opened this issue 2 years ago • 6 comments

GitLab provides a PATCH request to enable or disable a project's job_token_scope. But, as far as I'm aware, this is not yet supported by gitlabform.

hertzsprung avatar Oct 04 '23 15:10 hertzsprung

Hello. I believe this is same/duplicate of issue #571 . Could you please confirm?

amimas avatar Oct 04 '23 17:10 amimas

It's closely related, feel free to combine the two issues if appropriate. But the PATCH request only sets a boolean flag for the project, it doesn't allow fine grained control provided by the allowlist.

hertzsprung avatar Oct 04 '23 18:10 hertzsprung

the PATCH request only sets a boolean flag for the project,

Thanks for clarifying. I think it's fine for this to be a separate issue. Can be implemented without everything related to job token being involved. Keeps the scope small.

PRs are welcome. Would you be able to help contribute this feature? Do you have a proposal for the config syntax?

amimas avatar Oct 05 '23 00:10 amimas

Makes sense, thanks. I'll get back to you next week with a config syntax proposal that accommodates #607 and #571. If we're happy I'll try to find time to contribute, too.

hertzsprung avatar Oct 09 '23 17:10 hertzsprung

That sounds great!! Thanks.

amimas avatar Oct 09 '23 20:10 amimas

@amimas @hertzsprung changes to support this are here: https://github.com/TimKnight-DWP/gitlabform/pull/1

Currently on my fork only because I need to point at my fork of python-gitlab to pick up that part of the chain. Everything is capable of being merged when gitlab 16.10 gets released, so I'll update the MR to point back to mainline python-gitlab when this MR goers in https://github.com/python-gitlab/python-gitlab/pull/2816.

However a review of the proposed changes would be great if possible :)

TimKnight-DWP avatar Mar 11 '24 12:03 TimKnight-DWP

This has been completed and released in v3.12.0.

amimas avatar Oct 13 '24 22:10 amimas