Show / Hide Table of Contents

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",
    });
}

}
Inheritance
System.Object
Resource
CustomResource
RepositoryCollaborator
Inherited Members
CustomResource.Id
Resource.GetResourceType()
Resource.GetResourceName()
Resource.Urn
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Pulumi.Github
Assembly: Pulumi.Github.dll
Syntax
public class RepositoryCollaborator : CustomResource

Constructors

View Source

RepositoryCollaborator(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 Source

InvitationId

ID of the invitation to be used in github..UserInvitationAccepter

Declaration
public Output<string> InvitationId { get; }
Property Value
Type Description
Output<System.String>
View Source

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>
View Source

Repository

The GitHub repository

Declaration
public Output<string> Repository { get; }
Property Value
Type Description
Output<System.String>
View Source

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 Source

Get(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
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.