mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Adding releases events option to gitlab_hook module (#7956)
* Adding releases events option to gitlab_hook module * Fixing typo in documentation for gitlab_hook module * No default value for releases_events * Adding changelog fragment
This commit is contained in:
parent
001292c780
commit
1dd697bdc2
2 changed files with 12 additions and 0 deletions
|
@ -0,0 +1,2 @@
|
|||
minor_changes:
|
||||
- gitlab_hook - adds ``releases_events`` parameter for supporting Releases events triggers on GitLab hooks (https://github.com/ansible-collections/community.general/pull/7956).
|
|
@ -97,6 +97,11 @@ options:
|
|||
- Trigger hook on wiki events.
|
||||
type: bool
|
||||
default: false
|
||||
releases_events:
|
||||
description:
|
||||
- Trigger hook on release events.
|
||||
type: bool
|
||||
version_added: '8.4.0'
|
||||
hook_validate_certs:
|
||||
description:
|
||||
- Whether GitLab will do SSL verification when triggering the hook.
|
||||
|
@ -201,6 +206,7 @@ class GitLabHook(object):
|
|||
'job_events': options['job_events'],
|
||||
'pipeline_events': options['pipeline_events'],
|
||||
'wiki_page_events': options['wiki_page_events'],
|
||||
'releases_events': options['releases_events'],
|
||||
'enable_ssl_verification': options['enable_ssl_verification'],
|
||||
'token': options['token'],
|
||||
})
|
||||
|
@ -216,6 +222,7 @@ class GitLabHook(object):
|
|||
'job_events': options['job_events'],
|
||||
'pipeline_events': options['pipeline_events'],
|
||||
'wiki_page_events': options['wiki_page_events'],
|
||||
'releases_events': options['releases_events'],
|
||||
'enable_ssl_verification': options['enable_ssl_verification'],
|
||||
'token': options['token'],
|
||||
})
|
||||
|
@ -302,6 +309,7 @@ def main():
|
|||
job_events=dict(type='bool', default=False),
|
||||
pipeline_events=dict(type='bool', default=False),
|
||||
wiki_page_events=dict(type='bool', default=False),
|
||||
releases_events=dict(type='bool', default=None),
|
||||
hook_validate_certs=dict(type='bool', default=False, aliases=['enable_ssl_verification']),
|
||||
token=dict(type='str', no_log=True),
|
||||
))
|
||||
|
@ -339,6 +347,7 @@ def main():
|
|||
job_events = module.params['job_events']
|
||||
pipeline_events = module.params['pipeline_events']
|
||||
wiki_page_events = module.params['wiki_page_events']
|
||||
releases_events = module.params['releases_events']
|
||||
enable_ssl_verification = module.params['hook_validate_certs']
|
||||
hook_token = module.params['token']
|
||||
|
||||
|
@ -369,6 +378,7 @@ def main():
|
|||
"job_events": job_events,
|
||||
"pipeline_events": pipeline_events,
|
||||
"wiki_page_events": wiki_page_events,
|
||||
"releases_events": releases_events,
|
||||
"enable_ssl_verification": enable_ssl_verification,
|
||||
"token": hook_token,
|
||||
}):
|
||||
|
|
Loading…
Reference in a new issue