gitlab_*_access_token: add missing scopes (#10785)

Over time, GitLab added extra scopes to the API. I'm in here to add
self_rotate, but may as well add all other missing scopes while I'm
here.
This commit is contained in:
David Phillips 2025-09-04 07:40:06 +12:00 committed by GitHub
commit aed763dae7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 19 additions and 2 deletions

View file

@ -0,0 +1,3 @@
minor_changes:
- gitlab_group_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).
- gitlab_project_access_token - add missing scopes (https://github.com/ansible-collections/community.general/pull/10785).

View file

@ -51,6 +51,7 @@ options:
scopes:
description:
- Scope of the access token.
- The values V(read_virtual_registry), V(write_virtual_registry), V(manage_runner), and V(self_rotate) were added in community.general 11.3.0.
required: true
type: list
elements: str
@ -60,11 +61,15 @@ options:
- read_api
- read_registry
- write_registry
- read_virtual_registry
- write_virtual_registry
- read_repository
- write_repository
- create_runner
- manage_runner
- ai_features
- k8s_proxy
- self_rotate
access_level:
description:
- Access level of the access token.
@ -241,11 +246,15 @@ def main():
'read_api',
'read_registry',
'write_registry',
'read_virtual_registry',
'write_virtual_registry',
'read_repository',
'write_repository',
'create_runner',
'manage_runner',
'ai_features',
'k8s_proxy']),
'k8s_proxy',
'self_rotate']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'planner', 'reporter', 'developer', 'maintainer', 'owner']),
expires_at=dict(type='str', required=True),
recreate=dict(type='str', default='never', choices=['never', 'always', 'state_change'])

View file

@ -51,6 +51,7 @@ options:
scopes:
description:
- Scope of the access token.
- The values V(manage_runner) and V(self_rotate) were added in community.general 11.3.0.
required: true
type: list
elements: str
@ -63,8 +64,10 @@ options:
- read_repository
- write_repository
- create_runner
- manage_runner
- ai_features
- k8s_proxy
- self_rotate
access_level:
description:
- Access level of the access token.
@ -242,8 +245,10 @@ def main():
'read_repository',
'write_repository',
'create_runner',
'manage_runner',
'ai_features',
'k8s_proxy']),
'k8s_proxy',
'self_rotate']),
access_level=dict(type='str', default='maintainer', choices=['guest', 'planner', 'reporter', 'developer', 'maintainer', 'owner']),
expires_at=dict(type='str', required=True),
recreate=dict(type='str', default='never', choices=['never', 'always', 'state_change'])