# github_webhook_info – Query information about GitHub webhooks

New in version 2.8.

- Synopsis
- Requirements
- Parameters
- Examples
- Return Values
- Status

## Synopsis

- Query information about GitHub webhooks
- This module was called `github_webhook_facts` before Ansible 2.9. The usage did not change.

Aliases: github_webhook_facts

## 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_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_info:
        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.