Class 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",
});
}
}
Inherited Members
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class RepositoryCollaborator : CustomResource
Constructors
View SourceRepositoryCollaborator(String, RepositoryCollaboratorArgs, CustomResourceOptions)
Create a RepositoryCollaborator resource with the given unique name, arguments, and options.
Declaration
public RepositoryCollaborator(string name, RepositoryCollaboratorArgs args, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resource |
| RepositoryCollaboratorArgs | args | The arguments used to populate this resource's properties |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Properties
View SourceInvitationId
ID of the invitation to be used in github..UserInvitationAccepter
Declaration
public Output<string> InvitationId { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Permission
The permission of the outside collaborator for the repository.
Must be one of pull, push, maintain, triage or admin. Defaults to push.
Declaration
public Output<string> Permission { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Repository
The GitHub repository
Declaration
public Output<string> Repository { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Username
The user to add to the repository as a collaborator.
Declaration
public Output<string> Username { get; }
Property Value
| Type | Description |
|---|---|
| Output<System.String> |
Methods
View SourceGet(String, Input<String>, RepositoryCollaboratorState, CustomResourceOptions)
Get an existing RepositoryCollaborator resource's state with the given name, ID, and optional extra properties used to qualify the lookup.
Declaration
public static RepositoryCollaborator Get(string name, Input<string> id, RepositoryCollaboratorState state = null, CustomResourceOptions options = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | name | The unique name of the resulting resource. |
| Input<System.String> | id | The unique provider ID of the resource to lookup. |
| RepositoryCollaboratorState | state | Any extra arguments used during the lookup. |
| CustomResourceOptions | options | A bag of options that control this resource's behavior |
Returns
| Type | Description |
|---|---|
| RepositoryCollaborator |