On this page
github_webhook_facts – Query information about GitHub webhooks
New in version 2.8.
Synopsis
- Query information about GitHub webhooks
Requirements
The below requirements are needed on the host that executes this module.
- PyGithub >= 1.3.5
Parameters
Parameter | Choices/Defaults | Comments |
---|---|---|
github_url
-
|
Default:
"https://api.github.com"
|
Base URL of the github api
|
password
-
|
Password to authenticate to GitHub with
|
|
repository
- / required
|
Full name of the repository to configure a hook for
aliases: repo |
|
token
-
|
Token to authenticate to GitHub with
|
|
user
- / required
|
User to authenticate to GitHub as
|
Examples
- name: list hooks for a repository (password auth)
github_webhook_facts:
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:
repository: myorg/myrepo
user: "{{ github_user }}"
token: "{{ github_user_api_token }}"
github_url: https://github.example.com/api/v3/
register: myrepo_webhooks
Return Values
Common return values are documented here, the following are the fields unique to this module:
Key | Returned | Description |
---|---|---|
hooks
list
|
always |
A list of hooks that exist for the repo
Sample:
[{"has_shared_secret": true, "url": "https://jenkins.example.com/ghprbhook/", "events": ["issue_comment", "pull_request"], "insecure_ssl": "1", "content_type": "json", "active": true, "id": 6206, "last_response": {"status": "active", "message": "OK", "code": 200}}]
|
Status
- This module is not guaranteed to have a backwards compatible interface. [preview]
- This module is maintained by the Ansible Community. [community]
Authors
- Chris St. Pierre (@stpierre)
Hint
If you notice any issues in this documentation you can edit this document to improve it.
© 2012–2018 Michael DeHaan
© 2018–2019 Red Hat, Inc.
Licensed under the GNU General Public License version 3.
https://docs.ansible.com/ansible/2.8/modules/github_webhook_facts_module.html