Overview

Allows you to create and manage github repos. This includes repositories owned by the authenticated user, repositories where the authenticated user is a collaborator, and repositories that the authenticated user has access to through an organization membership.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ensure        => 'present',
  description   => 'Just some text.',
  has_issues    => 'true',
  has_wiki      => 'true',
  homepage      => 'http://www.enterprisemodules.com/',
}

Attributes

Attribute Name Short Description
credentials The credentials to use for github operations.
description The description of the resource.
ensure The basic property that the resource should be in.
has_issues Either true to enable issues for this repository, false to disable them.
has_wiki Either true to enable the wiki for this repository, false to disable it.
homepage A URL with more information about the repository.
name The full name of the repo.
owner the owner of the repository.
private Either true to make the repository private, or false to make it public.
provider resource.
really_delete contents when it is set to absent.
repository The name of the repository.

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_repo

description

The description of the resource.

github_... { '...':
  ...
  description => 'just some text',
  ...
}

Back to overview of github_repo

ensure

The basic property that the resource should be in.

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

has_issues

Either true to enable issues for this repository, false to disable them.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ...
  has_issues    => 'true',
  ...
}

Back to overview of github_repo

has_wiki

Either true to enable the wiki for this repository, false to disable it.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ...
  has_wiki      => 'true',
  ...
}

Back to overview of github_repo

homepage

A URL with more information about the repository.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ...
  homepage      => 'http://www.enterprisemodules.com/',
  ...
}

Back to overview of github_repo

name

The full name of the repo. The full name consists of the

  • autorisation
  • owner
  • repo name

Here is an example:

github_repo { 'authentication/owner/my_repo':
  ...
}

Puppet will map these values to the right puppet parameters.

Back to overview of github_repo

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_repo

private

Either true to make the repository private, or false to make it public. Creating private repositories requires a paid GitHub.

Here is an example on how to do this:

github_repo { 'account/owner/repo':
  ...
  private => true,
  ...
}

Back to overview of github_repo

provider

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

simple
Manage github repository through puppet

Back to overview of github_repo

really_delete

set thir parameter to true if you want toi REALLY delete the repo and its contents when it is set to absent.

This example will ony signal a warning:

github_repo { 'test/allow_delete':
  ensure => absent'
}

But this one will REALY delete the repo and all of its contents:

github_repo { 'test/allow_delete':
  ensure        => absent',
  really_delete => true,
}

The default is false menaing we will NOT delete the repo. Use with care!!

Valid values are true, false, yes, no. Back to overview of github_repo

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_repo