Namespace Pulumi.Github
Classes
ActionsSecret
ActionsSecretArgs
ActionsSecretState
Branch
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var development = new Github.Branch("development", new Github.BranchArgs
{
Branch = "development",
Repository = "example",
});
}
}
BranchArgs
BranchProtection
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var exampleTeam = new Github.Team("exampleTeam", new Github.TeamArgs
{
});
// 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.
var exampleBranchProtection = new Github.BranchProtection("exampleBranchProtection", new Github.BranchProtectionArgs
{
Branch = "master",
EnforceAdmins = true,
Repository = github_repository.Example.Name,
RequiredPullRequestReviews = new Github.Inputs.BranchProtectionRequiredPullRequestReviewsArgs
{
DismissStaleReviews = true,
DismissalTeams =
{
exampleTeam.Slug,
github_team.Second.Slug,
},
DismissalUsers =
{
"foo-user",
},
},
RequiredStatusChecks = new Github.Inputs.BranchProtectionRequiredStatusChecksArgs
{
Contexts =
{
"ci/travis",
},
Strict = false,
},
Restrictions = new Github.Inputs.BranchProtectionRestrictionsArgs
{
Apps =
{
"foo-app",
},
Teams =
{
exampleTeam.Slug,
},
Users =
{
"foo-user",
},
},
});
var exampleTeamRepository = new Github.TeamRepository("exampleTeamRepository", new Github.TeamRepositoryArgs
{
Permission = "pull",
Repository = github_repository.Example.Name,
TeamId = exampleTeam.Id,
});
}
}
BranchProtectionArgs
BranchProtectionState
BranchState
Config
GetActionsPublicKey
GetActionsPublicKeyArgs
GetActionsPublicKeyResult
GetBranch
GetBranchArgs
GetBranchResult
GetCollaborators
GetCollaboratorsArgs
GetCollaboratorsResult
GetIpRanges
GetIpRangesResult
GetMembership
GetMembershipArgs
GetMembershipResult
GetOrganizationTeamSyncGroups
GetOrganizationTeamSyncGroupsResult
GetRelease
GetReleaseArgs
GetReleaseResult
GetRepositories
GetRepositoriesArgs
GetRepositoriesResult
GetRepository
GetRepositoryArgs
GetRepositoryResult
GetTeam
GetTeamArgs
GetTeamResult
GetUser
GetUserArgs
GetUserResult
IssueLabel
IssueLabelArgs
IssueLabelState
Membership
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a user to the organization
var membershipForSomeUser = new Github.Membership("membershipForSomeUser", new Github.MembershipArgs
{
Role = "member",
Username = "SomeUser",
});
}
}
MembershipArgs
MembershipState
OrganizationBlock
This resource allows you to create and manage blocks for GitHub organizations.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = new Github.OrganizationBlock("example", new Github.OrganizationBlockArgs
{
Username = "paultyng",
});
}
}
OrganizationBlockArgs
OrganizationBlockState
OrganizationProject
This resource allows you to create and manage projects for GitHub organization.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var project = new Github.OrganizationProject("project", new Github.OrganizationProjectArgs
{
Body = "This is a organization project.",
});
}
}
OrganizationProjectArgs
OrganizationProjectState
OrganizationWebhook
This resource allows you to create and manage webhooks for GitHub organization.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var foo = new Github.OrganizationWebhook("foo", new Github.OrganizationWebhookArgs
{
Active = false,
Configuration = new Github.Inputs.OrganizationWebhookConfigurationArgs
{
ContentType = "form",
InsecureSsl = false,
Url = "https://google.de/",
},
Events =
{
"issues",
},
});
}
}
OrganizationWebhookArgs
OrganizationWebhookState
ProjectColumn
This resource allows you to create and manage columns for GitHub projects.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var project = new Github.OrganizationProject("project", new Github.OrganizationProjectArgs
{
Body = "This is an organization project.",
});
var column = new Github.ProjectColumn("column", new Github.ProjectColumnArgs
{
ProjectId = project.Id,
});
}
}
ProjectColumnArgs
ProjectColumnState
Provider
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.
ProviderArgs
Repository
RepositoryArgs
RepositoryCollaborator
Provides a GitHub repository collaborator resource.
This resource allows you to add/remove collaborators from repositories in your organization. Collaborators can have explicit (and differing levels of) read, write, or administrator access to specific repositories in your organization, without giving the user full organization membership.
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:
- Adding outside collaborators to repositories in your organization
- Converting an organization member to an outside collaborator
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a collaborator to a repository
var aRepoCollaborator = new Github.RepositoryCollaborator("aRepoCollaborator", new Github.RepositoryCollaboratorArgs
{
Permission = "admin",
Repository = "our-cool-repo",
Username = "SomeUser",
});
}
}
RepositoryCollaboratorArgs
RepositoryCollaboratorState
RepositoryDeployKey
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:
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a deploy key
var exampleRepositoryDeployKey = new Github.RepositoryDeployKey("exampleRepositoryDeployKey", new Github.RepositoryDeployKeyArgs
{
Key = "ssh-rsa AAA...",
ReadOnly = "false",
Repository = "test-repo",
Title = "Repository test key",
});
}
}
RepositoryDeployKeyArgs
RepositoryDeployKeyState
RepositoryFile
This resource allows you to create and manage files within a GitHub repository.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var gitignore = new Github.RepositoryFile("gitignore", new Github.RepositoryFileArgs
{
Content = "**/*.tfstate",
File = ".gitignore",
Repository = "example",
});
}
}
RepositoryFileArgs
RepositoryFileState
RepositoryProject
This resource allows you to create and manage projects for GitHub repository.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = new Github.Repository("example", new Github.RepositoryArgs
{
Description = "My awesome codebase",
HasProjects = true,
});
var project = new Github.RepositoryProject("project", new Github.RepositoryProjectArgs
{
Body = "This is a repository project.",
Repository = example.Name,
});
}
}
RepositoryProjectArgs
RepositoryProjectState
RepositoryState
RepositoryWebhook
RepositoryWebhookArgs
RepositoryWebhookState
Team
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a team to the organization
var someTeam = new Github.Team("someTeam", new Github.TeamArgs
{
Description = "Some cool team",
Privacy = "closed",
});
}
}
TeamArgs
TeamMembership
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.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a user to the organization
var membershipForSomeUser = new Github.Membership("membershipForSomeUser", new Github.MembershipArgs
{
Role = "member",
Username = "SomeUser",
});
var someTeam = new Github.Team("someTeam", new Github.TeamArgs
{
Description = "Some cool team",
});
var someTeamMembership = new Github.TeamMembership("someTeamMembership", new Github.TeamMembershipArgs
{
Role = "member",
TeamId = someTeam.Id,
Username = "SomeUser",
});
}
}
TeamMembershipArgs
TeamMembershipState
TeamRepository
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 github..Repository.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
// Add a repository to the team
var someTeam = new Github.Team("someTeam", new Github.TeamArgs
{
Description = "Some cool team",
});
var someRepo = new Github.Repository("someRepo", new Github.RepositoryArgs
{
});
var someTeamRepo = new Github.TeamRepository("someTeamRepo", new Github.TeamRepositoryArgs
{
Permission = "pull",
Repository = someRepo.Name,
TeamId = someTeam.Id,
});
}
}
TeamRepositoryArgs
TeamRepositoryState
TeamState
TeamSyncGroupMapping
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
TeamSyncGroupMappingArgs
TeamSyncGroupMappingState
UserGpgKey
Provides a GitHub user's GPG key resource.
This resource allows you to add/remove GPG keys from your user account.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = new Github.UserGpgKey("example", new Github.UserGpgKeyArgs
{
ArmoredPublicKey = @"-----BEGIN PGP PUBLIC KEY BLOCK-----
...
-----END PGP PUBLIC KEY BLOCK-----
",
});
}
}
UserGpgKeyArgs
UserGpgKeyState
UserInvitationAccepter
Provides a resource to manage GitHub repository collaborator invitations.
Example Usage
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var exampleRepository = new Github.Repository("exampleRepository", new Github.RepositoryArgs
{
});
var exampleRepositoryCollaborator = new Github.RepositoryCollaborator("exampleRepositoryCollaborator", new Github.RepositoryCollaboratorArgs
{
Permission = "push",
Repository = exampleRepository.Name,
Username = "example-username",
});
var invitee = new Github.Provider("invitee", new Github.ProviderArgs
{
Token = @var.Invitee_token,
});
var exampleUserInvitationAccepter = new Github.UserInvitationAccepter("exampleUserInvitationAccepter", new Github.UserInvitationAccepterArgs
{
InvitationId = exampleRepositoryCollaborator.InvitationId,
});
}
}
UserInvitationAccepterArgs
UserInvitationAccepterState
UserSshKey
Provides a GitHub user's SSH key resource.
This resource allows you to add/remove SSH keys from your user account.
Example Usage
using System.IO;
using Pulumi;
using Github = Pulumi.Github;
class MyStack : Stack
{
public MyStack()
{
var example = new Github.UserSshKey("example", new Github.UserSshKeyArgs
{
Key = File.ReadAllText("~/.ssh/id_rsa.pub"),
Title = "example title",
});
}
}