mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
gitlab_project: add param "issues_access_level" (#8760)
gitlab_project: add option `issues_access_level` to enable/disable project
This commit is contained in:
parent
3607e3d012
commit
5192ffe5b3
2 changed files with 17 additions and 2 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
minor_changes:
|
||||||
|
- gitlab_project - add option ``issues_access_level`` to enable/disable project issues (https://github.com/ansible-collections/community.general/pull/8760).
|
|
@ -162,10 +162,19 @@ options:
|
||||||
type: bool
|
type: bool
|
||||||
default: false
|
default: false
|
||||||
version_added: "4.0.0"
|
version_added: "4.0.0"
|
||||||
|
issues_access_level:
|
||||||
|
description:
|
||||||
|
- V(private) means that accessing issues tab is allowed only to project members.
|
||||||
|
- V(disabled) means that accessing issues tab is disabled.
|
||||||
|
- V(enabled) means that accessing issues tab is enabled.
|
||||||
|
- O(issues_access_level) and O(issues_enabled) are mutually exclusive.
|
||||||
|
type: str
|
||||||
|
choices: ["private", "disabled", "enabled"]
|
||||||
|
version_added: "9.4.0"
|
||||||
issues_enabled:
|
issues_enabled:
|
||||||
description:
|
description:
|
||||||
- Whether you want to create issues or not.
|
- Whether you want to create issues or not.
|
||||||
- Possible values are true and false.
|
- O(issues_access_level) and O(issues_enabled) are mutually exclusive.
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
lfs_enabled:
|
lfs_enabled:
|
||||||
|
@ -187,7 +196,6 @@ options:
|
||||||
merge_requests_enabled:
|
merge_requests_enabled:
|
||||||
description:
|
description:
|
||||||
- If merge requests can be made or not.
|
- If merge requests can be made or not.
|
||||||
- Possible values are true and false.
|
|
||||||
type: bool
|
type: bool
|
||||||
default: true
|
default: true
|
||||||
model_registry_access_level:
|
model_registry_access_level:
|
||||||
|
@ -432,6 +440,7 @@ class GitLabProject(object):
|
||||||
'feature_flags_access_level': options['feature_flags_access_level'],
|
'feature_flags_access_level': options['feature_flags_access_level'],
|
||||||
'forking_access_level': options['forking_access_level'],
|
'forking_access_level': options['forking_access_level'],
|
||||||
'infrastructure_access_level': options['infrastructure_access_level'],
|
'infrastructure_access_level': options['infrastructure_access_level'],
|
||||||
|
'issues_access_level': options['issues_access_level'],
|
||||||
'issues_enabled': options['issues_enabled'],
|
'issues_enabled': options['issues_enabled'],
|
||||||
'lfs_enabled': options['lfs_enabled'],
|
'lfs_enabled': options['lfs_enabled'],
|
||||||
'merge_method': options['merge_method'],
|
'merge_method': options['merge_method'],
|
||||||
|
@ -605,6 +614,7 @@ def main():
|
||||||
import_url=dict(type='str'),
|
import_url=dict(type='str'),
|
||||||
infrastructure_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']),
|
infrastructure_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']),
|
||||||
initialize_with_readme=dict(type='bool', default=False),
|
initialize_with_readme=dict(type='bool', default=False),
|
||||||
|
issues_access_level=dict(type='str', choices=['private', 'disabled', 'enabled']),
|
||||||
issues_enabled=dict(type='bool', default=True),
|
issues_enabled=dict(type='bool', default=True),
|
||||||
lfs_enabled=dict(default=False, type='bool'),
|
lfs_enabled=dict(default=False, type='bool'),
|
||||||
merge_method=dict(type='str', default='merge', choices=["merge", "rebase_merge", "ff"]),
|
merge_method=dict(type='str', default='merge', choices=["merge", "rebase_merge", "ff"]),
|
||||||
|
@ -641,6 +651,7 @@ def main():
|
||||||
['api_token', 'api_oauth_token'],
|
['api_token', 'api_oauth_token'],
|
||||||
['api_token', 'api_job_token'],
|
['api_token', 'api_job_token'],
|
||||||
['group', 'username'],
|
['group', 'username'],
|
||||||
|
['issues_access_level', 'issues_enabled'],
|
||||||
],
|
],
|
||||||
required_together=[
|
required_together=[
|
||||||
['api_username', 'api_password'],
|
['api_username', 'api_password'],
|
||||||
|
@ -668,6 +679,7 @@ def main():
|
||||||
import_url = module.params['import_url']
|
import_url = module.params['import_url']
|
||||||
infrastructure_access_level = module.params['infrastructure_access_level']
|
infrastructure_access_level = module.params['infrastructure_access_level']
|
||||||
initialize_with_readme = module.params['initialize_with_readme']
|
initialize_with_readme = module.params['initialize_with_readme']
|
||||||
|
issues_access_level = module.params['issues_access_level']
|
||||||
issues_enabled = module.params['issues_enabled']
|
issues_enabled = module.params['issues_enabled']
|
||||||
lfs_enabled = module.params['lfs_enabled']
|
lfs_enabled = module.params['lfs_enabled']
|
||||||
merge_method = module.params['merge_method']
|
merge_method = module.params['merge_method']
|
||||||
|
@ -751,6 +763,7 @@ def main():
|
||||||
"import_url": import_url,
|
"import_url": import_url,
|
||||||
"infrastructure_access_level": infrastructure_access_level,
|
"infrastructure_access_level": infrastructure_access_level,
|
||||||
"initialize_with_readme": initialize_with_readme,
|
"initialize_with_readme": initialize_with_readme,
|
||||||
|
"issues_access_level": issues_access_level,
|
||||||
"issues_enabled": issues_enabled,
|
"issues_enabled": issues_enabled,
|
||||||
"lfs_enabled": lfs_enabled,
|
"lfs_enabled": lfs_enabled,
|
||||||
"merge_method": merge_method,
|
"merge_method": merge_method,
|
||||||
|
|
Loading…
Reference in a new issue