Show / Hide Table of Contents

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

}
Inheritance
System.Object
Resource
CustomResource
Branch
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 Branch : CustomResource

Constructors

View Source

Branch(String, BranchArgs, CustomResourceOptions)

Create a Branch resource with the given unique name, arguments, and options.

Declaration
public Branch(string name, BranchArgs args, CustomResourceOptions options = null)
Parameters
Type Name Description
System.String name

The unique name of the resource

BranchArgs 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

BranchName

The repository branch to create.

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

Etag

An etag representing the Branch object.

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

Ref

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

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

Repository

The GitHub repository name.

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

Sha

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

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

SourceBranch

The branch name to start from. Defaults to master.

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

SourceSha

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

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

Methods

View Source

Get(String, Input<String>, BranchState, CustomResourceOptions)

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

Declaration
public static Branch Get(string name, Input<string> id, BranchState 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.

BranchState state

Any extra arguments used during the lookup.

CustomResourceOptions options

A bag of options that control this resource's behavior

Returns
Type Description
Branch
  • View Source
Back to top Copyright 2016-2020, Pulumi Corporation.