Overview

Allows you to manage repository hooks. The Repository Webhooks API allows repository admins to manage the post-receive hooks for a repository. Webhooks can be managed using the JSON HTTP API, or the PubSubHubbub API.

If you would like to set up a single webhook to receive events from all of your organization’s repositories, check out the github API documentation for Organization Webhooks.

Here is an example:

github_hook { 'authenticator/owner/repo:web':
  ensure => 'present',
  active => 'true',
  config => {'content_type' => 'form', 'insecure_ssl' => '0', 'url' => 'https://myurl.com'},
  events => ['push'],
}

Attributes

Attribute Name Short Description
active Specifies if the hook is active (e.g.
config Specfies the config used for the hook.
credentials The credentials to use for github operations.
ensure The basic property that the resource should be in.
events The event(s) that will activate the hook.
hook  
   
id For internal use only.
name The full name of the hook.
owner the owner of the repository.
provider resource.
repository The name of the repository.

active

Specifies if the hook is active (e.g. enabled). Here is an example

github_hook { '...':
  ...
  active => 'true',
  ...
}

Valid values are true, false. Back to overview of github_hook

config

Specfies the config used for the hook. The configuration is hook specfic. Check the documentation at github for the configuration options of a service.

github_hook { '...:
  ...
  config => {'content_type' => 'form', 'insecure_ssl' => '0', 'url' => 'https://myurl.com'},
  ...
}

Back to overview of github_hook

credentials

The credentials to use for github operations. This parameter is extracted from the full name. No need to specify it in the body of the puppet type.

This is the first part of the title of all github types

github_repo { 'credentials/....':
  ...
}

The credentials must first be specfied by using github_credentials

Back to overview of github_hook

ensure

The basic property that the resource should be in.

Valid values are present, absent. Back to overview of github_hook

events

The event(s) that will activate the hook. Check the github documentation for a list of events.

github_hook { '...':
  ...
  events => ['push'],
  ...
}

Back to overview of github_hook

hook

Back to overview of github_hook

id

For internal use only. Don’t use!

Back to overview of github_hook

name

The full name of the hook. The full name of the hook consists of the

  • autorisation
  • owner
  • repo name
  • hook name

Here is an example:

github_hook { 'autorisation/owner/repo:web':
  ...
}

Puppet will map these values to the right puppet parameters.

Back to overview of github_hook

owner

the owner of the repository. This parameter is extracted from the full name. No need to specify it in the body of the puppet type.

Back to overview of github_hook

provider

The specific backend to use for this github_hook resource. You will seldom need to specify this — Puppet will usually discover the appropriate provider for your platform.Available providers are:

simple
Manage github hooks

Back to overview of github_hook

repository

The name of the repository. This parameter is extracted from the full name. No need to specify it in the body of the puppet type.

Back to overview of github_hook