This page documents the language specification for the github package. If you're looking for help working with the inputs, outputs, or functions of github resources in a Pulumi program, please see the resource documentation for examples and API reference.

Pulumi GitHub

This provider is a derived work of the Terraform Provider distributed under MPL 2.0. If you encounter a bug or missing feature, first check the pulumi/pulumi-github repo; however, if that doesn’t turn up anything, please consult the source terraform-providers/terraform-provider-github repo.

class pulumi_github.ActionsSecret(resource_name, opts=None, plaintext_value=None, repository=None, secret_name=None, __props__=None, __name__=None, __opts__=None)

Create a ActionsSecret resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] plaintext_value: Plaintext value of the secret to be encrypted :param pulumi.Input[str] repository: Name of the repository :param pulumi.Input[str] secret_name: Name of the secret

created_at: pulumi.Output[str] = None

Date of actions_secret creation.

plaintext_value: pulumi.Output[str] = None

Plaintext value of the secret to be encrypted

repository: pulumi.Output[str] = None

Name of the repository

secret_name: pulumi.Output[str] = None

Name of the secret

updated_at: pulumi.Output[str] = None

Date of actions_secret update.

static get(resource_name, id, opts=None, created_at=None, plaintext_value=None, repository=None, secret_name=None, updated_at=None)

Get an existing ActionsSecret resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • created_at (pulumi.Input[str]) – Date of actions_secret creation.

  • plaintext_value (pulumi.Input[str]) – Plaintext value of the secret to be encrypted

  • repository (pulumi.Input[str]) – Name of the repository

  • secret_name (pulumi.Input[str]) – Name of the secret

  • updated_at (pulumi.Input[str]) – Date of actions_secret update.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.AwaitableGetActionsPublicKeyResult(id=None, key=None, key_id=None, repository=None)
class pulumi_github.AwaitableGetBranchResult(branch=None, etag=None, id=None, ref=None, repository=None, sha=None)
class pulumi_github.AwaitableGetCollaboratorsResult(affiliation=None, collaborators=None, id=None, owner=None, repository=None)
class pulumi_github.AwaitableGetIpRangesResult(gits=None, hooks=None, id=None, importers=None, pages=None)
class pulumi_github.AwaitableGetMembershipResult(etag=None, id=None, role=None, username=None)
class pulumi_github.AwaitableGetOrganizationTeamSyncGroupsResult(groups=None, id=None)
class pulumi_github.AwaitableGetReleaseResult(asserts_url=None, body=None, created_at=None, draft=None, html_url=None, id=None, name=None, owner=None, prerelease=None, published_at=None, release_id=None, release_tag=None, repository=None, retrieve_by=None, tarball_url=None, target_commitish=None, upload_url=None, url=None, zipball_url=None)
class pulumi_github.AwaitableGetRepositoriesResult(full_names=None, id=None, names=None, query=None, sort=None)
class pulumi_github.AwaitableGetRepositoryResult(allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, default_branch=None, description=None, full_name=None, git_clone_url=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, html_url=None, http_clone_url=None, id=None, name=None, node_id=None, private=None, ssh_clone_url=None, svn_url=None, topics=None, visibility=None)
class pulumi_github.AwaitableGetTeamResult(description=None, id=None, members=None, name=None, node_id=None, permission=None, privacy=None, slug=None)
class pulumi_github.AwaitableGetUserResult(avatar_url=None, bio=None, blog=None, company=None, created_at=None, email=None, followers=None, following=None, gpg_keys=None, gravatar_id=None, id=None, location=None, login=None, name=None, node_id=None, public_gists=None, public_repos=None, site_admin=None, ssh_keys=None, updated_at=None, username=None)
class pulumi_github.Branch(resource_name, opts=None, branch=None, repository=None, source_branch=None, source_sha=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage branches within your repository.

Additional constraints can be applied to ensure your branch is created from another branch or commit.

import pulumi
import pulumi_github as github

development = github.Branch("development",
    branch="development",
    repository="example")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – The repository branch to create.

  • repository (pulumi.Input[str]) – The GitHub repository name.

  • source_branch (pulumi.Input[str]) – The branch name to start from. Defaults to master.

  • source_sha (pulumi.Input[str]) – The commit hash to start from. Defaults to the tip of source_branch. If provided, source_branch is ignored.

branch: pulumi.Output[str] = None

The repository branch to create.

etag: pulumi.Output[str] = None

An etag representing the Branch object.

ref: pulumi.Output[str] = None

A string representing a branch reference, in the form of refs/heads/<branch>.

repository: pulumi.Output[str] = None

The GitHub repository name.

sha: pulumi.Output[str] = None

A string storing the reference’s HEAD commit’s SHA1.

source_branch: pulumi.Output[str] = None

The branch name to start from. Defaults to master.

source_sha: pulumi.Output[str] = None

The commit hash to start from. Defaults to the tip of source_branch. If provided, source_branch is ignored.

static get(resource_name, id, opts=None, branch=None, etag=None, ref=None, repository=None, sha=None, source_branch=None, source_sha=None)

Get an existing Branch resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – The repository branch to create.

  • etag (pulumi.Input[str]) – An etag representing the Branch object.

  • ref (pulumi.Input[str]) – A string representing a branch reference, in the form of refs/heads/<branch>.

  • repository (pulumi.Input[str]) – The GitHub repository name.

  • sha (pulumi.Input[str]) – A string storing the reference’s HEAD commit’s SHA1.

  • source_branch (pulumi.Input[str]) – The branch name to start from. Defaults to master.

  • source_sha (pulumi.Input[str]) – The commit hash to start from. Defaults to the tip of source_branch. If provided, source_branch is ignored.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.BranchProtection(resource_name, opts=None, branch=None, enforce_admins=None, repository=None, require_signed_commits=None, required_pull_request_reviews=None, required_status_checks=None, restrictions=None, __props__=None, __name__=None, __opts__=None)

Protects a GitHub branch.

This resource allows you to configure branch protection for repositories in your organization. When applied, the branch will be protected from forced pushes and deletion. Additional constraints, such as required status checks or restrictions on users, teams, and apps, can also be configured.

import pulumi
import pulumi_github as github

example_team = github.Team("exampleTeam")
# Protect the master branch of the foo repository. Additionally, require that
# the "ci/travis" context to be passing and only allow the engineers team merge
# to the branch.
example_branch_protection = github.BranchProtection("exampleBranchProtection",
    branch="master",
    enforce_admins=True,
    repository=github_repository["example"]["name"],
    required_pull_request_reviews={
        "dismissStaleReviews": True,
        "dismissalTeams": [
            example_team.slug,
            github_team["second"]["slug"],
        ],
        "dismissalUsers": ["foo-user"],
    },
    required_status_checks={
        "contexts": ["ci/travis"],
        "strict": False,
    },
    restrictions={
        "apps": ["foo-app"],
        "teams": [example_team.slug],
        "users": ["foo-user"],
    })
example_team_repository = github.TeamRepository("exampleTeamRepository",
    permission="pull",
    repository=github_repository["example"]["name"],
    team_id=example_team.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – The Git branch to protect.

  • enforce_admins (pulumi.Input[bool]) – Boolean, setting this to true enforces status checks for repository administrators.

  • repository (pulumi.Input[str]) – The GitHub repository name.

  • require_signed_commits (pulumi.Input[bool]) – Boolean, setting this to true requires all commits to be signed with GPG.

  • required_pull_request_reviews (pulumi.Input[dict]) – Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.

  • required_status_checks (pulumi.Input[dict]) – Enforce restrictions for required status checks. See Required Status Checks below for details.

  • restrictions (pulumi.Input[dict]) – Enforce restrictions for the users and teams that may push to the branch. See Restrictions below for details.

The required_pull_request_reviews object supports the following:

  • dismissStaleReviews (pulumi.Input[bool])

  • dismissalTeams (pulumi.Input[list])

  • dismissalUsers (pulumi.Input[list])

  • includeAdmins (pulumi.Input[bool])

  • requireCodeOwnerReviews (pulumi.Input[bool])

  • requiredApprovingReviewCount (pulumi.Input[float])

The required_status_checks object supports the following:

  • contexts (pulumi.Input[list])

  • includeAdmins (pulumi.Input[bool])

  • strict (pulumi.Input[bool])

The restrictions object supports the following:

  • apps (pulumi.Input[list])

  • teams (pulumi.Input[list])

  • users (pulumi.Input[list])

branch: pulumi.Output[str] = None

The Git branch to protect.

enforce_admins: pulumi.Output[bool] = None

Boolean, setting this to true enforces status checks for repository administrators.

repository: pulumi.Output[str] = None

The GitHub repository name.

require_signed_commits: pulumi.Output[bool] = None

Boolean, setting this to true requires all commits to be signed with GPG.

required_pull_request_reviews: pulumi.Output[dict] = None

Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.

  • dismissStaleReviews (bool)

  • dismissalTeams (list)

  • dismissalUsers (list)

  • includeAdmins (bool)

  • requireCodeOwnerReviews (bool)

  • requiredApprovingReviewCount (float)

required_status_checks: pulumi.Output[dict] = None

Enforce restrictions for required status checks. See Required Status Checks below for details.

  • contexts (list)

  • includeAdmins (bool)

  • strict (bool)

restrictions: pulumi.Output[dict] = None

Enforce restrictions for the users and teams that may push to the branch. See Restrictions below for details.

  • apps (list)

  • teams (list)

  • users (list)

static get(resource_name, id, opts=None, branch=None, enforce_admins=None, etag=None, repository=None, require_signed_commits=None, required_pull_request_reviews=None, required_status_checks=None, restrictions=None)

Get an existing BranchProtection resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – The Git branch to protect.

  • enforce_admins (pulumi.Input[bool]) – Boolean, setting this to true enforces status checks for repository administrators.

  • repository (pulumi.Input[str]) – The GitHub repository name.

  • require_signed_commits (pulumi.Input[bool]) – Boolean, setting this to true requires all commits to be signed with GPG.

  • required_pull_request_reviews (pulumi.Input[dict]) – Enforce restrictions for pull request reviews. See Required Pull Request Reviews below for details.

  • required_status_checks (pulumi.Input[dict]) – Enforce restrictions for required status checks. See Required Status Checks below for details.

  • restrictions (pulumi.Input[dict]) – Enforce restrictions for the users and teams that may push to the branch. See Restrictions below for details.

The required_pull_request_reviews object supports the following:

  • dismissStaleReviews (pulumi.Input[bool])

  • dismissalTeams (pulumi.Input[list])

  • dismissalUsers (pulumi.Input[list])

  • includeAdmins (pulumi.Input[bool])

  • requireCodeOwnerReviews (pulumi.Input[bool])

  • requiredApprovingReviewCount (pulumi.Input[float])

The required_status_checks object supports the following:

  • contexts (pulumi.Input[list])

  • includeAdmins (pulumi.Input[bool])

  • strict (pulumi.Input[bool])

The restrictions object supports the following:

  • apps (pulumi.Input[list])

  • teams (pulumi.Input[list])

  • users (pulumi.Input[list])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.GetActionsPublicKeyResult(id=None, key=None, key_id=None, repository=None)

A collection of values returned by getActionsPublicKey.

id = None

The provider-assigned unique ID for this managed resource.

key = None

Actual key retrieved.

key_id = None

ID of the key that has been retrieved.

class pulumi_github.GetBranchResult(branch=None, etag=None, id=None, ref=None, repository=None, sha=None)

A collection of values returned by getBranch.

etag = None

An etag representing the Branch object.

id = None

The provider-assigned unique ID for this managed resource.

ref = None

A string representing a branch reference, in the form of refs/heads/<branch>.

sha = None

A string storing the reference’s HEAD commit’s SHA1.

class pulumi_github.GetCollaboratorsResult(affiliation=None, collaborators=None, id=None, owner=None, repository=None)

A collection of values returned by getCollaborators.

collaborators = None

An Array of GitHub collaborators. Each collaborator block consists of the fields documented below.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_github.GetIpRangesResult(gits=None, hooks=None, id=None, importers=None, pages=None)

A collection of values returned by getIpRanges.

gits = None

An Array of IP addresses in CIDR format specifying the Git servers.

hooks = None

An Array of IP addresses in CIDR format specifying the addresses that incoming service hooks will originate from.

id = None

The provider-assigned unique ID for this managed resource.

importers = None

An Array of IP addresses in CIDR format specifying the A records for GitHub Importer.

pages = None

An Array of IP addresses in CIDR format specifying the A records for GitHub Pages.

class pulumi_github.GetMembershipResult(etag=None, id=None, role=None, username=None)

A collection of values returned by getMembership.

etag = None

An etag representing the membership object.

id = None

The provider-assigned unique ID for this managed resource.

role = None

admin or member – the role the user has within the organization.

username = None

The username.

class pulumi_github.GetOrganizationTeamSyncGroupsResult(groups=None, id=None)

A collection of values returned by getOrganizationTeamSyncGroups.

groups = None

An Array of GitHub Identity Provider Groups. Each group block consists of the fields documented below.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_github.GetReleaseResult(asserts_url=None, body=None, created_at=None, draft=None, html_url=None, id=None, name=None, owner=None, prerelease=None, published_at=None, release_id=None, release_tag=None, repository=None, retrieve_by=None, tarball_url=None, target_commitish=None, upload_url=None, url=None, zipball_url=None)

A collection of values returned by getRelease.

asserts_url = None

URL of any associated assets with the release

body = None

Contents of the description (body) of a release

created_at = None

Date of release creation

draft = None

(Boolean) indicates whether the release is a draft

html_url = None

URL directing to detailed information on the release

id = None

The provider-assigned unique ID for this managed resource.

name = None

Name of release

prerelease = None

(Boolean) indicates whether the release is a prerelease

published_at = None

Date of release publishing

release_id = None

ID of release

release_tag = None

Tag of release

tarball_url = None

Download URL of a specific release in tar.gz format

target_commitish = None

Commitish value that determines where the Git release is created from

upload_url = None

URL that can be used to upload Assets to the release

url = None

Base URL of the release

zipball_url = None

Download URL of a specific release in zip format

class pulumi_github.GetRepositoriesResult(full_names=None, id=None, names=None, query=None, sort=None)

A collection of values returned by getRepositories.

id = None

The provider-assigned unique ID for this managed resource.

class pulumi_github.GetRepositoryResult(allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, default_branch=None, description=None, full_name=None, git_clone_url=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, html_url=None, http_clone_url=None, id=None, name=None, node_id=None, private=None, ssh_clone_url=None, svn_url=None, topics=None, visibility=None)

A collection of values returned by getRepository.

allow_merge_commit = None

Whether the repository allows merge commits.

allow_rebase_merge = None

Whether the repository allows rebase merges.

allow_squash_merge = None

Whether the repository allows squash merges.

archived = None

Whether the repository is archived.

default_branch = None

The name of the default branch of the repository.

description = None

A description of the repository.

git_clone_url = None

URL that can be provided to git clone to clone the repository anonymously via the git protocol.

has_downloads = None

Whether the repository has Downloads feature enabled.

has_issues = None

Whether the repository has GitHub Issues enabled.

has_projects = None

Whether the repository has the GitHub Projects enabled.

has_wiki = None

Whether the repository has the GitHub Wiki enabled.

homepage_url = None

URL of a page describing the project.

html_url = None

URL to the repository on the web.

http_clone_url = None

URL that can be provided to git clone to clone the repository via HTTPS.

id = None

The provider-assigned unique ID for this managed resource.

private = None

Whether the repository is private.

ssh_clone_url = None

URL that can be provided to git clone to clone the repository via SSH.

svn_url = None

URL that can be provided to svn checkout to check out the repository via GitHub’s Subversion protocol emulation.

topics = None

The list of topics of the repository.

visibility = None

Whether the repository is public, private or internal.

class pulumi_github.GetTeamResult(description=None, id=None, members=None, name=None, node_id=None, permission=None, privacy=None, slug=None)

A collection of values returned by getTeam.

description = None

the team’s description.

id = None

The provider-assigned unique ID for this managed resource.

members = None

List of team members

name = None

the team’s full name.

permission = None

the team’s permission level.

privacy = None

the team’s privacy type.

class pulumi_github.GetUserResult(avatar_url=None, bio=None, blog=None, company=None, created_at=None, email=None, followers=None, following=None, gpg_keys=None, gravatar_id=None, id=None, location=None, login=None, name=None, node_id=None, public_gists=None, public_repos=None, site_admin=None, ssh_keys=None, updated_at=None, username=None)

A collection of values returned by getUser.

avatar_url = None

the user’s avatar URL.

bio = None

the user’s bio.

blog = None

the user’s blog location.

company = None

the user’s company name.

created_at = None

the creation date.

email = None

the user’s email.

followers = None

the number of followers.

following = None

the number of following users.

gpg_keys = None

list of user’s GPG keys.

gravatar_id = None

the user’s gravatar ID.

id = None

The provider-assigned unique ID for this managed resource.

location = None

the user’s location.

login = None

the user’s login.

name = None

the user’s full name.

public_gists = None

the number of public gists.

public_repos = None

the number of public repositories.

site_admin = None

whether the user is a GitHub admin.

ssh_keys = None

list of user’s SSH keys.

updated_at = None

the update date.

class pulumi_github.IssueLabel(resource_name, opts=None, color=None, description=None, name=None, repository=None, __props__=None, __name__=None, __opts__=None)

Create a IssueLabel resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[str] color: A 6 character hex code, without the leading #, identifying the color of the label. :param pulumi.Input[str] description: A short description of the label. :param pulumi.Input[str] name: The name of the label. :param pulumi.Input[str] repository: The GitHub repository

color: pulumi.Output[str] = None

A 6 character hex code, without the leading #, identifying the color of the label.

description: pulumi.Output[str] = None

A short description of the label.

name: pulumi.Output[str] = None

The name of the label.

repository: pulumi.Output[str] = None

The GitHub repository

url: pulumi.Output[str] = None

The URL to the issue label

static get(resource_name, id, opts=None, color=None, description=None, etag=None, name=None, repository=None, url=None)

Get an existing IssueLabel resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • color (pulumi.Input[str]) – A 6 character hex code, without the leading #, identifying the color of the label.

  • description (pulumi.Input[str]) – A short description of the label.

  • name (pulumi.Input[str]) – The name of the label.

  • repository (pulumi.Input[str]) – The GitHub repository

  • url (pulumi.Input[str]) – The URL to the issue label

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.Membership(resource_name, opts=None, role=None, username=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub membership resource.

This resource allows you to add/remove users from your organization. When applied, an invitation will be sent to the user to become part of the organization. When destroyed, either the invitation will be cancelled or the user will be removed.

import pulumi
import pulumi_github as github

# Add a user to the organization
membership_for_some_user = github.Membership("membershipForSomeUser",
    role="member",
    username="SomeUser")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role of the user within the organization. Must be one of member or admin. Defaults to member.

  • username (pulumi.Input[str]) – The user to add to the organization.

role: pulumi.Output[str] = None

The role of the user within the organization. Must be one of member or admin. Defaults to member.

username: pulumi.Output[str] = None

The user to add to the organization.

static get(resource_name, id, opts=None, etag=None, role=None, username=None)

Get an existing Membership resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role of the user within the organization. Must be one of member or admin. Defaults to member.

  • username (pulumi.Input[str]) – The user to add to the organization.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.OrganizationBlock(resource_name, opts=None, username=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage blocks for GitHub organizations.

import pulumi
import pulumi_github as github

example = github.OrganizationBlock("example", username="paultyng")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • username (pulumi.Input[str]) – The name of the user to block.

username: pulumi.Output[str] = None

The name of the user to block.

static get(resource_name, id, opts=None, etag=None, username=None)

Get an existing OrganizationBlock resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • username (pulumi.Input[str]) – The name of the user to block.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.OrganizationProject(resource_name, opts=None, body=None, name=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage projects for GitHub organization.

import pulumi
import pulumi_github as github

project = github.OrganizationProject("project", body="This is a organization project.")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • body (pulumi.Input[str]) – The body of the project.

  • name (pulumi.Input[str]) – The name of the project.

body: pulumi.Output[str] = None

The body of the project.

name: pulumi.Output[str] = None

The name of the project.

url: pulumi.Output[str] = None

URL of the project

static get(resource_name, id, opts=None, body=None, etag=None, name=None, url=None)

Get an existing OrganizationProject resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • body (pulumi.Input[str]) – The body of the project.

  • name (pulumi.Input[str]) – The name of the project.

  • url (pulumi.Input[str]) – URL of the project

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.OrganizationWebhook(resource_name, opts=None, active=None, configuration=None, events=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage webhooks for GitHub organization.

import pulumi
import pulumi_github as github

foo = github.OrganizationWebhook("foo",
    active=False,
    configuration={
        "contentType": "form",
        "insecureSsl": False,
        "url": "https://google.de/",
    },
    events=["issues"])
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • active (pulumi.Input[bool]) – Indicate of the webhook should receive events. Defaults to true.

  • configuration (pulumi.Input[dict]) – key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl.

  • events (pulumi.Input[list]) – A list of events which should trigger the webhook. See a list of available events

The configuration object supports the following:

  • contentType (pulumi.Input[str])

  • insecureSsl (pulumi.Input[bool])

  • secret (pulumi.Input[str])

  • url (pulumi.Input[str]) - URL of the webhook

active: pulumi.Output[bool] = None

Indicate of the webhook should receive events. Defaults to true.

configuration: pulumi.Output[dict] = None

key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl.

  • contentType (str)

  • insecureSsl (bool)

  • secret (str)

  • url (str) - URL of the webhook

events: pulumi.Output[list] = None

A list of events which should trigger the webhook. See a list of available events

url: pulumi.Output[str] = None

URL of the webhook

static get(resource_name, id, opts=None, active=None, configuration=None, etag=None, events=None, url=None)

Get an existing OrganizationWebhook resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • active (pulumi.Input[bool]) – Indicate of the webhook should receive events. Defaults to true.

  • configuration (pulumi.Input[dict]) – key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl.

  • events (pulumi.Input[list]) –

    A list of events which should trigger the webhook. See a list of available events

  • url (pulumi.Input[str]) – URL of the webhook

The configuration object supports the following:

  • contentType (pulumi.Input[str])

  • insecureSsl (pulumi.Input[bool])

  • secret (pulumi.Input[str])

  • url (pulumi.Input[str]) - URL of the webhook

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.ProjectColumn(resource_name, opts=None, name=None, project_id=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage columns for GitHub projects.

import pulumi
import pulumi_github as github

project = github.OrganizationProject("project", body="This is an organization project.")
column = github.ProjectColumn("column", project_id=project.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the column.

  • project_id (pulumi.Input[str]) – The ID of an existing project that the column will be created in.

name: pulumi.Output[str] = None

The name of the column.

project_id: pulumi.Output[str] = None

The ID of an existing project that the column will be created in.

static get(resource_name, id, opts=None, etag=None, name=None, project_id=None)

Get an existing ProjectColumn resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • name (pulumi.Input[str]) – The name of the column.

  • project_id (pulumi.Input[str]) – The ID of an existing project that the column will be created in.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.Provider(resource_name, opts=None, base_url=None, organization=None, owner=None, token=None, __props__=None, __name__=None, __opts__=None)

The provider type for the github package. By default, resources use package-wide configuration settings, however an explicit Provider instance may be created and passed during resource construction to achieve fine-grained programmatic control over provider settings. See the documentation for more information.

Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • base_url (pulumi.Input[str]) – The GitHub Base API URL

  • organization (pulumi.Input[str]) – (Deprecated) The GitHub organization name to manage.

  • owner (pulumi.Input[str]) – The GitHub owner name to manage.

  • token (pulumi.Input[str]) – The OAuth token used to connect to GitHub. If anonymous is false, token is required.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.Repository(resource_name, opts=None, allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, auto_init=None, default_branch=None, delete_branch_on_merge=None, description=None, gitignore_template=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, is_template=None, license_template=None, name=None, private=None, template=None, topics=None, visibility=None, __props__=None, __name__=None, __opts__=None)

Create a Repository resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] allow_merge_commit: Set to false to disable merge commits on the repository. :param pulumi.Input[bool] allow_rebase_merge: Set to false to disable rebase merges on the repository. :param pulumi.Input[bool] allow_squash_merge: Set to false to disable squash merges on the repository. :param pulumi.Input[bool] archived: Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving. :param pulumi.Input[bool] auto_init: Set to true to produce an initial commit in the repository. :param pulumi.Input[str] default_branch: The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created,

and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute.

Parameters
  • delete_branch_on_merge (pulumi.Input[bool]) – Automatically delete head branch after a pull request is merged. Defaults to false.

  • description (pulumi.Input[str]) – A description of the repository.

  • gitignore_template (pulumi.Input[str]) – Use the name of the template without the extension. For example, “Haskell”.

  • has_downloads (pulumi.Input[bool]) – Set to true to enable the (deprecated) downloads features on the repository.

  • has_issues (pulumi.Input[bool]) – Set to true to enable the GitHub Issues features on the repository.

  • has_projects (pulumi.Input[bool]) –

    Set to true to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error.

  • has_wiki (pulumi.Input[bool]) – Set to true to enable the GitHub Wiki features on the repository.

  • homepage_url (pulumi.Input[str]) – URL of a page describing the project.

  • is_template (pulumi.Input[bool]) – Set to true to tell GitHub that this is a template repository.

  • license_template (pulumi.Input[str]) –

    Use the name of the template without the extension. For example, “mit” or “mpl-2.0”.

  • name (pulumi.Input[str]) – The name of the repository.

  • private (pulumi.Input[bool]) – Set to true to create a private repository. Repositories are created as public (e.g. open source) by default.

  • template (pulumi.Input[dict]) – Use a template repository to create this resource. See Template Repositories below for details.

  • topics (pulumi.Input[list]) – The list of topics of the repository.

  • visibility (pulumi.Input[str]) – Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter.

The template object supports the following:

  • owner (pulumi.Input[str])

  • repository (pulumi.Input[str])

allow_merge_commit: pulumi.Output[bool] = None

Set to false to disable merge commits on the repository.

allow_rebase_merge: pulumi.Output[bool] = None

Set to false to disable rebase merges on the repository.

allow_squash_merge: pulumi.Output[bool] = None

Set to false to disable squash merges on the repository.

archived: pulumi.Output[bool] = None

Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving.

auto_init: pulumi.Output[bool] = None

Set to true to produce an initial commit in the repository.

default_branch: pulumi.Output[str] = None

The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute.

delete_branch_on_merge: pulumi.Output[bool] = None

Automatically delete head branch after a pull request is merged. Defaults to false.

description: pulumi.Output[str] = None

A description of the repository.

full_name: pulumi.Output[str] = None

A string of the form “orgname/reponame”.

git_clone_url: pulumi.Output[str] = None

URL that can be provided to git clone to clone the repository anonymously via the git protocol.

gitignore_template: pulumi.Output[str] = None

Use the name of the template without the extension. For example, “Haskell”.

has_downloads: pulumi.Output[bool] = None

Set to true to enable the (deprecated) downloads features on the repository.

has_issues: pulumi.Output[bool] = None

Set to true to enable the GitHub Issues features on the repository.

has_projects: pulumi.Output[bool] = None

Set to true to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error.

has_wiki: pulumi.Output[bool] = None

Set to true to enable the GitHub Wiki features on the repository.

homepage_url: pulumi.Output[str] = None

URL of a page describing the project.

html_url: pulumi.Output[str] = None

URL to the repository on the web.

http_clone_url: pulumi.Output[str] = None

URL that can be provided to git clone to clone the repository via HTTPS.

is_template: pulumi.Output[bool] = None

Set to true to tell GitHub that this is a template repository.

license_template: pulumi.Output[str] = None

Use the name of the template without the extension. For example, “mit” or “mpl-2.0”.

name: pulumi.Output[str] = None

The name of the repository.

private: pulumi.Output[bool] = None

Set to true to create a private repository. Repositories are created as public (e.g. open source) by default.

ssh_clone_url: pulumi.Output[str] = None

URL that can be provided to git clone to clone the repository via SSH.

svn_url: pulumi.Output[str] = None

URL that can be provided to svn checkout to check out the repository via GitHub’s Subversion protocol emulation.

template: pulumi.Output[dict] = None

Use a template repository to create this resource. See Template Repositories below for details.

  • owner (str)

  • repository (str)

topics: pulumi.Output[list] = None

The list of topics of the repository.

visibility: pulumi.Output[str] = None

Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter.

static get(resource_name, id, opts=None, allow_merge_commit=None, allow_rebase_merge=None, allow_squash_merge=None, archived=None, auto_init=None, default_branch=None, delete_branch_on_merge=None, description=None, etag=None, full_name=None, git_clone_url=None, gitignore_template=None, has_downloads=None, has_issues=None, has_projects=None, has_wiki=None, homepage_url=None, html_url=None, http_clone_url=None, is_template=None, license_template=None, name=None, node_id=None, private=None, ssh_clone_url=None, svn_url=None, template=None, topics=None, visibility=None)

Get an existing Repository resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • allow_merge_commit (pulumi.Input[bool]) – Set to false to disable merge commits on the repository.

  • allow_rebase_merge (pulumi.Input[bool]) – Set to false to disable rebase merges on the repository.

  • allow_squash_merge (pulumi.Input[bool]) – Set to false to disable squash merges on the repository.

  • archived (pulumi.Input[bool]) – Specifies if the repository should be archived. Defaults to false. NOTE Currently, the API does not support unarchiving.

  • auto_init (pulumi.Input[bool]) – Set to true to produce an initial commit in the repository.

  • default_branch (pulumi.Input[str]) – The name of the default branch of the repository. NOTE: This can only be set after a repository has already been created, and after a correct reference has been created for the target branch inside the repository. This means a user will have to omit this parameter from the initial repository creation and create the target branch inside of the repository prior to setting this attribute.

  • delete_branch_on_merge (pulumi.Input[bool]) – Automatically delete head branch after a pull request is merged. Defaults to false.

  • description (pulumi.Input[str]) – A description of the repository.

  • full_name (pulumi.Input[str]) – A string of the form “orgname/reponame”.

  • git_clone_url (pulumi.Input[str]) – URL that can be provided to git clone to clone the repository anonymously via the git protocol.

  • gitignore_template (pulumi.Input[str]) –

    Use the name of the template without the extension. For example, “Haskell”.

  • has_downloads (pulumi.Input[bool]) – Set to true to enable the (deprecated) downloads features on the repository.

  • has_issues (pulumi.Input[bool]) – Set to true to enable the GitHub Issues features on the repository.

  • has_projects (pulumi.Input[bool]) –

    Set to true to enable the GitHub Projects features on the repository. Per the GitHub documentation when in an organization that has disabled repository projects it will default to false and will otherwise default to true. If you specify true when it has been disabled it will return an error.

  • has_wiki (pulumi.Input[bool]) – Set to true to enable the GitHub Wiki features on the repository.

  • homepage_url (pulumi.Input[str]) – URL of a page describing the project.

  • html_url (pulumi.Input[str]) – URL to the repository on the web.

  • http_clone_url (pulumi.Input[str]) – URL that can be provided to git clone to clone the repository via HTTPS.

  • is_template (pulumi.Input[bool]) – Set to true to tell GitHub that this is a template repository.

  • license_template (pulumi.Input[str]) –

    Use the name of the template without the extension. For example, “mit” or “mpl-2.0”.

  • name (pulumi.Input[str]) – The name of the repository.

  • private (pulumi.Input[bool]) – Set to true to create a private repository. Repositories are created as public (e.g. open source) by default.

  • ssh_clone_url (pulumi.Input[str]) – URL that can be provided to git clone to clone the repository via SSH.

  • svn_url (pulumi.Input[str]) – URL that can be provided to svn checkout to check out the repository via GitHub’s Subversion protocol emulation.

  • template (pulumi.Input[dict]) – Use a template repository to create this resource. See Template Repositories below for details.

  • topics (pulumi.Input[list]) – The list of topics of the repository.

  • visibility (pulumi.Input[str]) – Can be public or private. If your organization is associated with an enterprise account using GitHub Enterprise Cloud or GitHub Enterprise Server 2.20+, visibility can also be internal. The visibility parameter overrides the private parameter.

The template object supports the following:

  • owner (pulumi.Input[str])

  • repository (pulumi.Input[str])

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.RepositoryCollaborator(resource_name, opts=None, permission=None, repository=None, username=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub repository collaborator resource.

This resource allows you to add/remove collaborators from repositories in your organization or personal account. For organization repositories, collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories, without giving the user full organization membership. For personal repositories, collaborators can only be granted write (implictly includes read) permission.

When applied, an invitation will be sent to the user to become a collaborator on a repository. When destroyed, either the invitation will be cancelled or the collaborator will be removed from the repository.

Further documentation on GitHub collaborators:

import pulumi
import pulumi_github as github

# Add a collaborator to a repository
a_repo_collaborator = github.RepositoryCollaborator("aRepoCollaborator",
    permission="admin",
    repository="our-cool-repo",
    username="SomeUser")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • permission (pulumi.Input[str]) – The permission of the outside collaborator for the repository. Must be one of pull, push, maintain, triage or admin for organization-owned repositories. Must be push for personal repositories. Defaults to push.

  • repository (pulumi.Input[str]) – The GitHub repository

  • username (pulumi.Input[str]) – The user to add to the repository as a collaborator.

invitation_id: pulumi.Output[str] = None

ID of the invitation to be used in .UserInvitationAccepter

permission: pulumi.Output[str] = None

The permission of the outside collaborator for the repository. Must be one of pull, push, maintain, triage or admin for organization-owned repositories. Must be push for personal repositories. Defaults to push.

repository: pulumi.Output[str] = None

The GitHub repository

username: pulumi.Output[str] = None

The user to add to the repository as a collaborator.

static get(resource_name, id, opts=None, invitation_id=None, permission=None, repository=None, username=None)

Get an existing RepositoryCollaborator resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • invitation_id (pulumi.Input[str]) – ID of the invitation to be used in .UserInvitationAccepter

  • permission (pulumi.Input[str]) – The permission of the outside collaborator for the repository. Must be one of pull, push, maintain, triage or admin for organization-owned repositories. Must be push for personal repositories. Defaults to push.

  • repository (pulumi.Input[str]) – The GitHub repository

  • username (pulumi.Input[str]) – The user to add to the repository as a collaborator.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.RepositoryDeployKey(resource_name, opts=None, key=None, read_only=None, repository=None, title=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub repository deploy key resource.

A deploy key is an SSH key that is stored on your server and grants access to a single GitHub repository. This key is attached directly to the repository instead of to a personal user account.

This resource allows you to add/remove repository deploy keys.

Further documentation on GitHub repository deploy keys:

import pulumi
import pulumi_github as github

# Add a deploy key
example_repository_deploy_key = github.RepositoryDeployKey("exampleRepositoryDeployKey",
    key="ssh-rsa AAA...",
    read_only="false",
    repository="test-repo",
    title="Repository test key")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • key (pulumi.Input[str]) – A SSH key.

  • read_only (pulumi.Input[bool]) – A boolean qualifying the key to be either read only or read/write.

  • repository (pulumi.Input[str]) – Name of the GitHub repository.

  • title (pulumi.Input[str]) – A title.

key: pulumi.Output[str] = None

A SSH key.

read_only: pulumi.Output[bool] = None

A boolean qualifying the key to be either read only or read/write.

repository: pulumi.Output[str] = None

Name of the GitHub repository.

title: pulumi.Output[str] = None

A title.

static get(resource_name, id, opts=None, etag=None, key=None, read_only=None, repository=None, title=None)

Get an existing RepositoryDeployKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • key (pulumi.Input[str]) – A SSH key.

  • read_only (pulumi.Input[bool]) – A boolean qualifying the key to be either read only or read/write.

  • repository (pulumi.Input[str]) – Name of the GitHub repository.

  • title (pulumi.Input[str]) – A title.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.RepositoryFile(resource_name, opts=None, branch=None, commit_author=None, commit_email=None, commit_message=None, content=None, file=None, repository=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage files within a GitHub repository.

import pulumi
import pulumi_github as github

gitignore = github.RepositoryFile("gitignore",
    content="**/*.tfstate",
    file=".gitignore",
    repository="example")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

  • commit_author (pulumi.Input[str]) – Committer author name to use.

  • commit_email (pulumi.Input[str]) – Committer email address to use.

  • commit_message (pulumi.Input[str]) – Commit message when adding or updating the managed file.

  • content (pulumi.Input[str]) – The file content.

  • file (pulumi.Input[str]) – The path of the file to manage.

  • repository (pulumi.Input[str]) – The repository name

branch: pulumi.Output[str] = None

Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

commit_author: pulumi.Output[str] = None

Committer author name to use.

commit_email: pulumi.Output[str] = None

Committer email address to use.

commit_message: pulumi.Output[str] = None

Commit message when adding or updating the managed file.

content: pulumi.Output[str] = None

The file content.

file: pulumi.Output[str] = None

The path of the file to manage.

repository: pulumi.Output[str] = None

The repository name

sha: pulumi.Output[str] = None

The SHA blob of the file.

static get(resource_name, id, opts=None, branch=None, commit_author=None, commit_email=None, commit_message=None, content=None, file=None, repository=None, sha=None)

Get an existing RepositoryFile resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • branch (pulumi.Input[str]) – Git branch (defaults to master). The branch must already exist, it will not be created if it does not already exist.

  • commit_author (pulumi.Input[str]) – Committer author name to use.

  • commit_email (pulumi.Input[str]) – Committer email address to use.

  • commit_message (pulumi.Input[str]) – Commit message when adding or updating the managed file.

  • content (pulumi.Input[str]) – The file content.

  • file (pulumi.Input[str]) – The path of the file to manage.

  • repository (pulumi.Input[str]) – The repository name

  • sha (pulumi.Input[str]) – The SHA blob of the file.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.RepositoryProject(resource_name, opts=None, body=None, name=None, repository=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage projects for GitHub repository.

import pulumi
import pulumi_github as github

example = github.Repository("example",
    description="My awesome codebase",
    has_projects=True)
project = github.RepositoryProject("project",
    body="This is a repository project.",
    repository=example.name)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • body (pulumi.Input[str]) – The body of the project.

  • name (pulumi.Input[str]) – The name of the project.

  • repository (pulumi.Input[str]) – The repository of the project.

body: pulumi.Output[str] = None

The body of the project.

name: pulumi.Output[str] = None

The name of the project.

repository: pulumi.Output[str] = None

The repository of the project.

url: pulumi.Output[str] = None

URL of the project

static get(resource_name, id, opts=None, body=None, etag=None, name=None, repository=None, url=None)

Get an existing RepositoryProject resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • body (pulumi.Input[str]) – The body of the project.

  • name (pulumi.Input[str]) – The name of the project.

  • repository (pulumi.Input[str]) – The repository of the project.

  • url (pulumi.Input[str]) – URL of the project

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.RepositoryWebhook(resource_name, opts=None, active=None, configuration=None, events=None, repository=None, __props__=None, __name__=None, __opts__=None)

Create a RepositoryWebhook resource with the given unique name, props, and options. :param str resource_name: The name of the resource. :param pulumi.ResourceOptions opts: Options for the resource. :param pulumi.Input[bool] active: Indicate of the webhook should receive events. Defaults to true. :param pulumi.Input[dict] configuration: key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl. secret is the shared secret, see API documentation. :param pulumi.Input[list] events: A list of events which should trigger the webhook. See a list of available events. :param pulumi.Input[str] repository: The repository of the webhook.

The configuration object supports the following:

  • contentType (pulumi.Input[str])

  • insecureSsl (pulumi.Input[bool])

  • secret (pulumi.Input[str])

  • url (pulumi.Input[str]) - URL of the webhook

active: pulumi.Output[bool] = None

Indicate of the webhook should receive events. Defaults to true.

configuration: pulumi.Output[dict] = None

key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl. secret is the shared secret, see API documentation.

  • contentType (str)

  • insecureSsl (bool)

  • secret (str)

  • url (str) - URL of the webhook

events: pulumi.Output[list] = None

A list of events which should trigger the webhook. See a list of available events.

repository: pulumi.Output[str] = None

The repository of the webhook.

url: pulumi.Output[str] = None

URL of the webhook

static get(resource_name, id, opts=None, active=None, configuration=None, etag=None, events=None, repository=None, url=None)

Get an existing RepositoryWebhook resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • active (pulumi.Input[bool]) – Indicate of the webhook should receive events. Defaults to true.

  • configuration (pulumi.Input[dict]) –

    key/value pair of configuration for this webhook. Available keys are url, content_type, secret and insecure_ssl. secret is the shared secret, see API documentation.

  • events (pulumi.Input[list]) –

    A list of events which should trigger the webhook. See a list of available events.

  • repository (pulumi.Input[str]) – The repository of the webhook.

  • url (pulumi.Input[str]) – URL of the webhook

The configuration object supports the following:

  • contentType (pulumi.Input[str])

  • insecureSsl (pulumi.Input[bool])

  • secret (pulumi.Input[str])

  • url (pulumi.Input[str]) - URL of the webhook

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.Team(resource_name, opts=None, description=None, ldap_dn=None, name=None, parent_team_id=None, privacy=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub team resource.

This resource allows you to add/remove teams from your organization. When applied, a new team will be created. When destroyed, that team will be removed.

import pulumi
import pulumi_github as github

# Add a team to the organization
some_team = github.Team("someTeam",
    description="Some cool team",
    privacy="closed")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A description of the team.

  • ldap_dn (pulumi.Input[str]) – The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.

  • name (pulumi.Input[str]) – The name of the team.

  • parent_team_id (pulumi.Input[float]) – The ID of the parent team, if this is a nested team.

  • privacy (pulumi.Input[str]) – The level of privacy for the team. Must be one of secret or closed. Defaults to secret.

description: pulumi.Output[str] = None

A description of the team.

ldap_dn: pulumi.Output[str] = None

The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.

name: pulumi.Output[str] = None

The name of the team.

parent_team_id: pulumi.Output[float] = None

The ID of the parent team, if this is a nested team.

privacy: pulumi.Output[str] = None

The level of privacy for the team. Must be one of secret or closed. Defaults to secret.

slug: pulumi.Output[str] = None

The slug of the created team, which may or may not differ from name, depending on whether name contains “URL-unsafe” characters. Useful when referencing the team in `.BranchProtection`` <https://www.terraform.io/docs/providers/github/r/branch_protection.html>`_.

static get(resource_name, id, opts=None, description=None, etag=None, ldap_dn=None, name=None, node_id=None, parent_team_id=None, privacy=None, slug=None)

Get an existing Team resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • description (pulumi.Input[str]) – A description of the team.

  • ldap_dn (pulumi.Input[str]) – The LDAP Distinguished Name of the group where membership will be synchronized. Only available in GitHub Enterprise.

  • name (pulumi.Input[str]) – The name of the team.

  • parent_team_id (pulumi.Input[float]) – The ID of the parent team, if this is a nested team.

  • privacy (pulumi.Input[str]) – The level of privacy for the team. Must be one of secret or closed. Defaults to secret.

  • slug (pulumi.Input[str]) – The slug of the created team, which may or may not differ from name, depending on whether name contains “URL-unsafe” characters. Useful when referencing the team in `.BranchProtection`` <https://www.terraform.io/docs/providers/github/r/branch_protection.html>`_.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.TeamMembership(resource_name, opts=None, role=None, team_id=None, username=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub team membership resource.

This resource allows you to add/remove users from teams in your organization. When applied, the user will be added to the team. If the user hasn’t accepted their invitation to the organization, they won’t be part of the team until they do. When destroyed, the user will be removed from the team.

import pulumi
import pulumi_github as github

# Add a user to the organization
membership_for_some_user = github.Membership("membershipForSomeUser",
    role="member",
    username="SomeUser")
some_team = github.Team("someTeam", description="Some cool team")
some_team_membership = github.TeamMembership("someTeamMembership",
    role="member",
    team_id=some_team.id,
    username="SomeUser")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role of the user within the team. Must be one of member or maintainer. Defaults to member.

  • team_id (pulumi.Input[str]) – The GitHub team id

  • username (pulumi.Input[str]) – The user to add to the team.

role: pulumi.Output[str] = None

The role of the user within the team. Must be one of member or maintainer. Defaults to member.

team_id: pulumi.Output[str] = None

The GitHub team id

username: pulumi.Output[str] = None

The user to add to the team.

static get(resource_name, id, opts=None, etag=None, role=None, team_id=None, username=None)

Get an existing TeamMembership resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • role (pulumi.Input[str]) – The role of the user within the team. Must be one of member or maintainer. Defaults to member.

  • team_id (pulumi.Input[str]) – The GitHub team id

  • username (pulumi.Input[str]) – The user to add to the team.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.TeamRepository(resource_name, opts=None, permission=None, repository=None, team_id=None, __props__=None, __name__=None, __opts__=None)

This resource manages relationships between teams and repositories in your GitHub organization.

Creating this resource grants a particular team permissions on a particular repository.

The repository and the team must both belong to the same organization on GitHub. This resource does not actually create any repositories; to do that, see .Repository.

import pulumi
import pulumi_github as github

# Add a repository to the team
some_team = github.Team("someTeam", description="Some cool team")
some_repo = github.Repository("someRepo")
some_team_repo = github.TeamRepository("someTeamRepo",
    permission="pull",
    repository=some_repo.name,
    team_id=some_team.id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • permission (pulumi.Input[str]) – The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

  • repository (pulumi.Input[str]) – The repository to add to the team.

  • team_id (pulumi.Input[str]) – The GitHub team id

permission: pulumi.Output[str] = None

The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

repository: pulumi.Output[str] = None

The repository to add to the team.

team_id: pulumi.Output[str] = None

The GitHub team id

static get(resource_name, id, opts=None, etag=None, permission=None, repository=None, team_id=None)

Get an existing TeamRepository resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • permission (pulumi.Input[str]) – The permissions of team members regarding the repository. Must be one of pull, triage, push, maintain, or admin. Defaults to pull.

  • repository (pulumi.Input[str]) – The repository to add to the team.

  • team_id (pulumi.Input[str]) – The GitHub team id

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.TeamSyncGroupMapping(resource_name, opts=None, groups=None, team_slug=None, __props__=None, __name__=None, __opts__=None)

This resource allows you to create and manage Identity Provider (IdP) group connections within your GitHub teams. You must have team synchronization enabled for organizations owned by enterprise accounts.

To learn more about team synchronization between IdPs and Github, please refer to: https://help.github.com/en/github/setting-up-and-managing-organizations-and-teams/synchronizing-teams-between-your-identity-provider-and-github

import pulumi
import pulumi_github as github

example_groups = github.get_organization_team_sync_groups()
example_group_mapping = github.TeamSyncGroupMapping("exampleGroupMapping",
    team_slug="example",
    dynamic=[{
        "forEach": [g for g in example_groups.groups if g["groupName"] == "some_team_group"],
        "content": [{
            "groupId": group["value"]["group_id"],
            "groupName": group["value"]["group_name"],
            "groupDescription": group["value"]["group_description"],
        }],
    }])
Parameters
  • resource*name (str) –

    The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • groups (pulumi.Input[list]) – An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below. __*

  • team_slug (pulumi.Input[str]) – Slug of the team

The groups object supports the following:

  • groupDescription (pulumi.Input[str]) - The description of the IdP group.

  • groupId (pulumi.Input[str]) - The ID of the IdP group.

  • groupName (pulumi.Input[str]) - The name of the IdP group.

groups: pulumi.Output[list] = None

An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below.

  • groupDescription (str) - The description of the IdP group.

  • groupId (str) - The ID of the IdP group.

  • groupName (str) - The name of the IdP group.

team_slug: pulumi.Output[str] = None

Slug of the team

static get(resource_name, id, opts=None, etag=None, groups=None, team_slug=None)

Get an existing TeamSyncGroupMapping resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource*name (str) –

    The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • groups (pulumi.Input[list]) – An Array of GitHub Identity Provider Groups (or empty []). Each group block consists of the fields documented below. __*

  • team_slug (pulumi.Input[str]) – Slug of the team

The groups object supports the following:

  • groupDescription (pulumi.Input[str]) - The description of the IdP group.

  • groupId (pulumi.Input[str]) - The ID of the IdP group.

  • groupName (pulumi.Input[str]) - The name of the IdP group.

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.UserGpgKey(resource_name, opts=None, armored_public_key=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub user’s GPG key resource.

This resource allows you to add/remove GPG keys from your user account.

import pulumi
import pulumi_github as github

example = github.UserGpgKey("example", armored_public_key="""-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----
""")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • armored_public_key (pulumi.Input[str]) – Your public GPG key, generated in ASCII-armored format. See Generating a new GPG key for help on creating a GPG key.

armored_public_key: pulumi.Output[str] = None

Your public GPG key, generated in ASCII-armored format. See Generating a new GPG key for help on creating a GPG key.

key_id: pulumi.Output[str] = None

The key ID of the GPG key, e.g. 3262EFF25BA0D270

static get(resource_name, id, opts=None, armored_public_key=None, etag=None, key_id=None)

Get an existing UserGpgKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • armored_public_key (pulumi.Input[str]) –

    Your public GPG key, generated in ASCII-armored format. See Generating a new GPG key for help on creating a GPG key.

  • key_id (pulumi.Input[str]) – The key ID of the GPG key, e.g. 3262EFF25BA0D270

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.UserInvitationAccepter(resource_name, opts=None, invitation_id=None, __props__=None, __name__=None, __opts__=None)

Provides a resource to manage GitHub repository collaborator invitations.

import pulumi
import pulumi_github as github
import pulumi_pulumi as pulumi

example_repository = github.Repository("exampleRepository")
example_repository_collaborator = github.RepositoryCollaborator("exampleRepositoryCollaborator",
    permission="push",
    repository=example_repository.name,
    username="example-username")
invitee = pulumi.providers.Github("invitee", token=var["invitee_token"])
example_user_invitation_accepter = github.UserInvitationAccepter("exampleUserInvitationAccepter", invitation_id=example_repository_collaborator.invitation_id)
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • invitation_id (pulumi.Input[str]) – ID of the invitation to accept

invitation_id: pulumi.Output[str] = None

ID of the invitation to accept

static get(resource_name, id, opts=None, invitation_id=None)

Get an existing UserInvitationAccepter resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • invitation_id (pulumi.Input[str]) – ID of the invitation to accept

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

class pulumi_github.UserSshKey(resource_name, opts=None, key=None, title=None, __props__=None, __name__=None, __opts__=None)

Provides a GitHub user’s SSH key resource.

This resource allows you to add/remove SSH keys from your user account.

import pulumi
import pulumi_github as github

example = github.UserSshKey("example",
    key=(lambda path: open(path).read())("~/.ssh/id_rsa.pub"),
    title="example title")
Parameters
  • resource_name (str) – The name of the resource.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • key (pulumi.Input[str]) – The public SSH key to add to your GitHub account.

  • title (pulumi.Input[str]) – A descriptive name for the new key. e.g. Personal MacBook Air

key: pulumi.Output[str] = None

The public SSH key to add to your GitHub account.

title: pulumi.Output[str] = None

A descriptive name for the new key. e.g. Personal MacBook Air

url: pulumi.Output[str] = None

The URL of the SSH key

static get(resource_name, id, opts=None, etag=None, key=None, title=None, url=None)

Get an existing UserSshKey resource’s state with the given name, id, and optional extra properties used to qualify the lookup.

Parameters
  • resource_name (str) – The unique name of the resulting resource.

  • id (str) – The unique provider ID of the resource to lookup.

  • opts (pulumi.ResourceOptions) – Options for the resource.

  • key (pulumi.Input[str]) – The public SSH key to add to your GitHub account.

  • title (pulumi.Input[str]) – A descriptive name for the new key. e.g. Personal MacBook Air

  • url (pulumi.Input[str]) – The URL of the SSH key

translate_output_property(prop)

Provides subclasses of Resource an opportunity to translate names of output properties into a format of their choosing before writing those properties to the resource object.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

translate_input_property(prop)

Provides subclasses of Resource an opportunity to translate names of input properties into a format of their choosing before sending those properties to the Pulumi engine.

Parameters

prop (str) – A property name.

Returns

A potentially transformed property name.

Return type

str

pulumi_github.get_actions_public_key(repository=None, opts=None)

Use this data source to retrieve information about a GitHub Actions public key. This data source is required to be used with other GitHub secrets interactions. Note that the provider token must have admin rights to a repository to retrieve it’s action public key.

import pulumi
import pulumi_github as github

example = github.get_actions_public_key(repository="example_repo")
Parameters

repository (str) – Name of the repository to get public key from.

pulumi_github.get_branch(branch=None, repository=None, opts=None)

Use this data source to retrieve information about a repository branch.

import pulumi
import pulumi_github as github

development = github.get_branch(branch="development",
    repository="example")
Parameters
  • branch (str) – The repository branch to create.

  • repository (str) – The GitHub repository name.

pulumi_github.get_collaborators(affiliation=None, owner=None, repository=None, opts=None)

Use this data source to retrieve the collaborators for a given repository.

import pulumi
import pulumi_github as github

test = github.get_collaborators(owner="example_owner",
    repository="example_repository")
Parameters
  • affiliation (str) – Filter collaborators returned by their affiliation. Can be one of: outside, direct, all. Defaults to all.

  • owner (str) – The organization that owns the repository.

  • repository (str) – The name of the repository.

pulumi_github.get_ip_ranges(opts=None)

Use this data source to retrieve information about GitHub’s IP addresses.

import pulumi
import pulumi_github as github

test = github.get_ip_ranges()
pulumi_github.get_membership(username=None, opts=None)

Use this data source to find out if a user is a member of your organization, as well as what role they have within it. If the user’s membership in the organization is pending their acceptance of an invite, the role they would have once they accept will be returned.

import pulumi
import pulumi_github as github

membership_for_some_user = github.get_membership(username="SomeUser")
Parameters

username (str) – The username to lookup in the organization.

pulumi_github.get_organization_team_sync_groups(opts=None)

Use this data source to retrieve the identity provider (IdP) groups for an organization.

import pulumi
import pulumi_github as github

test = github.get_organization_team_sync_groups()
pulumi_github.get_release(owner=None, release_id=None, release_tag=None, repository=None, retrieve_by=None, opts=None)

Use this data source to retrieve information about a GitHub release in a specific repository.

import pulumi
import pulumi_github as github

example = github.get_release(owner="example-owner",
    repository="example-repository",
    retrieve_by="latest")
Parameters
  • owner (str) – Owner of the repository.

  • release_id (float) – ID of the release to retrieve. Must be specified when retrieve_by = id.

  • release_tag (str) – Tag of the release to retrieve. Must be specified when retrieve_by = tag.

  • repository (str) – Name of the repository to retrieve the release from.

  • retrieve_by (str) – Describes how to fetch the release. Valid values are id, tag, latest.

pulumi_github.get_repositories(query=None, sort=None, opts=None)
Note: The data source will return a maximum of 1000 repositories

as documented in official API docs.

Use this data source to retrieve a list of GitHub repositories using a search query.

import pulumi
import pulumi_github as github

example = github.get_repositories(query="org:hashicorp language:Go")
Parameters
  • query (str) – Search query. See documentation for the search syntax.

  • sort (str) – Sorts the repositories returned by the specified attribute. Valid values include stars, fork, and updated. Defaults to updated.

pulumi_github.get_repository(full_name=None, name=None, opts=None)

Use this data source to access information about an existing resource.

Parameters
  • full_name (str) – Full name of the repository (in org/name format).

  • name (str) – The name of the repository.

pulumi_github.get_team(slug=None, opts=None)

Use this data source to retrieve information about a GitHub team.

import pulumi
import pulumi_github as github

example = github.get_team(slug="example")
Parameters

slug (str) – The team slug.

pulumi_github.get_user(username=None, opts=None)

Use this data source to retrieve information about a GitHub user.

import pulumi
import pulumi_github as github

example = github.get_user(username="example")
Parameters

username (str) – The username.