Second batch for _facts -> _info rename (#57020)

* Second batch of _facts -> _info.

* Forgot one reference.
This commit is contained in:
Felix Fontein
2019-06-10 13:04:07 +02:00
committed by GitHub
parent e25269e1b3
commit 039eb892ba
11 changed files with 64 additions and 45 deletions

View File

@@ -20,7 +20,7 @@ short_description: Manages GitHub service hooks.
deprecated:
removed_in: "2.12"
why: Replaced by more granular modules
alternative: Use M(github_webhook) and M(github_webhook_facts) instead.
alternative: Use M(github_webhook) and M(github_webhook_info) instead.
description:
- Adds service hooks and removes service hooks that have an error status.
version_added: "1.4"

View File

@@ -0,0 +1 @@
github_webhook_info.py

View File

@@ -14,11 +14,12 @@ ANSIBLE_METADATA = {
DOCUMENTATION = '''
---
module: github_webhook_facts
module: github_webhook_info
short_description: Query information about GitHub webhooks
version_added: "2.8"
description:
- "Query information about GitHub webhooks"
- This module was called C(github_webhook_facts) before Ansible 2.9. The usage did not change.
requirements:
- "PyGithub >= 1.3.5"
options:
@@ -52,14 +53,14 @@ author:
EXAMPLES = '''
- name: list hooks for a repository (password auth)
github_webhook_facts:
github_webhook_info:
repository: ansible/ansible
user: "{{ github_user }}"
password: "{{ github_password }}"
register: ansible_webhooks
- name: list hooks for a repository on GitHub Enterprise (token auth)
github_webhook_facts:
github_webhook_info:
repository: myorg/myrepo
user: "{{ github_user }}"
token: "{{ github_user_api_token }}"
@@ -126,6 +127,8 @@ def main():
mutually_exclusive=(('password', 'token'), ),
required_one_of=(("password", "token"), ),
supports_check_mode=True)
if module._name == 'github_webhook_facts':
module.deprecate("The 'github_webhook_facts' module has been renamed to 'github_webhook_info'", version='2.13')
if not HAS_GITHUB:
module.fail_json(msg=missing_required_lib('PyGithub'),