GetBranch

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

Example Usage

using Pulumi;
using Github = Pulumi.Github;

class MyStack : Stack
{
    public MyStack()
    {
        var development = Output.Create(Github.GetBranch.InvokeAsync(new Github.GetBranchArgs
        {
            Branch = "development",
            Repository = "example",
        }));
    }

}

Coming soon!

import pulumi
import pulumi_github as github

development = github.get_branch(branch="development",
    repository="example")
import * as pulumi from "@pulumi/pulumi";
import * as github from "@pulumi/github";

const development = pulumi.output(github.getBranch({
    branch: "development",
    repository: "example",
}, { async: true }));

Using GetBranch

function getBranch(args: GetBranchArgs, opts?: InvokeOptions): Promise<GetBranchResult>
function  get_branch(branch=None, repository=None, opts=None)
func LookupBranch(ctx *Context, args *LookupBranchArgs, opts ...InvokeOption) (*LookupBranchResult, error)

Note: This function is named LookupBranch in the Go SDK.

public static class GetBranch {
    public static Task<GetBranchResult> InvokeAsync(GetBranchArgs args, InvokeOptions? opts = null)
}

The following arguments are supported:

Branch string

The repository branch to create.

Repository string

The GitHub repository name.

Branch string

The repository branch to create.

Repository string

The GitHub repository name.

branch string

The repository branch to create.

repository string

The GitHub repository name.

branch str

The repository branch to create.

repository str

The GitHub repository name.

GetBranch Result

The following output properties are available:

Branch string
Etag string

An etag representing the Branch object.

Id string

The provider-assigned unique ID for this managed resource.

Ref string

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

Repository string
Sha string

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

Branch string
Etag string

An etag representing the Branch object.

Id string

The provider-assigned unique ID for this managed resource.

Ref string

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

Repository string
Sha string

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

branch string
etag string

An etag representing the Branch object.

id string

The provider-assigned unique ID for this managed resource.

ref string

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

repository string
sha string

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

branch str
etag str

An etag representing the Branch object.

id str

The provider-assigned unique ID for this managed resource.

ref str

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

repository str
sha str

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

Package Details

Repository
https://github.com/pulumi/pulumi-github
License
Apache-2.0
Notes
This Pulumi package is based on the github Terraform Provider.