1. Packages
  2. Gitlab Provider
  3. API Docs
  4. getBranch
GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi

gitlab.getBranch

Explore with Pulumi AI

gitlab logo
GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi

    The gitlab.Branch data source allows details of a repository branch to be retrieved by its name and project.

    Upstream API: GitLab REST API docs

    Using getBranch

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getBranch(args: GetBranchArgs, opts?: InvokeOptions): Promise<GetBranchResult>
    function getBranchOutput(args: GetBranchOutputArgs, opts?: InvokeOptions): Output<GetBranchResult>
    def get_branch(name: Optional[str] = None,
                   project: Optional[str] = None,
                   opts: Optional[InvokeOptions] = None) -> GetBranchResult
    def get_branch_output(name: Optional[pulumi.Input[str]] = None,
                   project: Optional[pulumi.Input[str]] = None,
                   opts: Optional[InvokeOptions] = None) -> Output[GetBranchResult]
    func LookupBranch(ctx *Context, args *LookupBranchArgs, opts ...InvokeOption) (*LookupBranchResult, error)
    func LookupBranchOutput(ctx *Context, args *LookupBranchOutputArgs, opts ...InvokeOption) LookupBranchResultOutput

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

    public static class GetBranch 
    {
        public static Task<GetBranchResult> InvokeAsync(GetBranchArgs args, InvokeOptions? opts = null)
        public static Output<GetBranchResult> Invoke(GetBranchInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetBranchResult> getBranch(GetBranchArgs args, InvokeOptions options)
    // Output-based functions aren't available in Java yet
    
    fn::invoke:
      function: gitlab:index/getBranch:getBranch
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Name string
    The name of the branch.
    Project string
    The full path or id of the project.
    Name string
    The name of the branch.
    Project string
    The full path or id of the project.
    name String
    The name of the branch.
    project String
    The full path or id of the project.
    name string
    The name of the branch.
    project string
    The full path or id of the project.
    name str
    The name of the branch.
    project str
    The full path or id of the project.
    name String
    The name of the branch.
    project String
    The full path or id of the project.

    getBranch Result

    The following output properties are available:

    CanPush bool
    Bool, true if you can push to the branch.
    Commits List<Pulumi.GitLab.Outputs.GetBranchCommit>
    The commit associated with the branch ref.
    Default bool
    Bool, true if branch is the default branch for the project.
    DeveloperCanMerge bool
    Bool, true if developer level access allows to merge branch.
    DeveloperCanPush bool
    Bool, true if developer level access allows git push.
    Id string
    The provider-assigned unique ID for this managed resource.
    Merged bool
    Bool, true if the branch has been merged into it's parent.
    Name string
    The name of the branch.
    Project string
    The full path or id of the project.
    Protected bool
    Bool, true if branch has branch protection.
    WebUrl string
    The url of the created branch (https.)
    CanPush bool
    Bool, true if you can push to the branch.
    Commits []GetBranchCommit
    The commit associated with the branch ref.
    Default bool
    Bool, true if branch is the default branch for the project.
    DeveloperCanMerge bool
    Bool, true if developer level access allows to merge branch.
    DeveloperCanPush bool
    Bool, true if developer level access allows git push.
    Id string
    The provider-assigned unique ID for this managed resource.
    Merged bool
    Bool, true if the branch has been merged into it's parent.
    Name string
    The name of the branch.
    Project string
    The full path or id of the project.
    Protected bool
    Bool, true if branch has branch protection.
    WebUrl string
    The url of the created branch (https.)
    canPush Boolean
    Bool, true if you can push to the branch.
    commits List<GetBranchCommit>
    The commit associated with the branch ref.
    default_ Boolean
    Bool, true if branch is the default branch for the project.
    developerCanMerge Boolean
    Bool, true if developer level access allows to merge branch.
    developerCanPush Boolean
    Bool, true if developer level access allows git push.
    id String
    The provider-assigned unique ID for this managed resource.
    merged Boolean
    Bool, true if the branch has been merged into it's parent.
    name String
    The name of the branch.
    project String
    The full path or id of the project.
    protected_ Boolean
    Bool, true if branch has branch protection.
    webUrl String
    The url of the created branch (https.)
    canPush boolean
    Bool, true if you can push to the branch.
    commits GetBranchCommit[]
    The commit associated with the branch ref.
    default boolean
    Bool, true if branch is the default branch for the project.
    developerCanMerge boolean
    Bool, true if developer level access allows to merge branch.
    developerCanPush boolean
    Bool, true if developer level access allows git push.
    id string
    The provider-assigned unique ID for this managed resource.
    merged boolean
    Bool, true if the branch has been merged into it's parent.
    name string
    The name of the branch.
    project string
    The full path or id of the project.
    protected boolean
    Bool, true if branch has branch protection.
    webUrl string
    The url of the created branch (https.)
    can_push bool
    Bool, true if you can push to the branch.
    commits Sequence[GetBranchCommit]
    The commit associated with the branch ref.
    default bool
    Bool, true if branch is the default branch for the project.
    developer_can_merge bool
    Bool, true if developer level access allows to merge branch.
    developer_can_push bool
    Bool, true if developer level access allows git push.
    id str
    The provider-assigned unique ID for this managed resource.
    merged bool
    Bool, true if the branch has been merged into it's parent.
    name str
    The name of the branch.
    project str
    The full path or id of the project.
    protected bool
    Bool, true if branch has branch protection.
    web_url str
    The url of the created branch (https.)
    canPush Boolean
    Bool, true if you can push to the branch.
    commits List<Property Map>
    The commit associated with the branch ref.
    default Boolean
    Bool, true if branch is the default branch for the project.
    developerCanMerge Boolean
    Bool, true if developer level access allows to merge branch.
    developerCanPush Boolean
    Bool, true if developer level access allows git push.
    id String
    The provider-assigned unique ID for this managed resource.
    merged Boolean
    Bool, true if the branch has been merged into it's parent.
    name String
    The name of the branch.
    project String
    The full path or id of the project.
    protected Boolean
    Bool, true if branch has branch protection.
    webUrl String
    The url of the created branch (https.)

    Supporting Types

    GetBranchCommit

    AuthorEmail string
    The email of the author.
    AuthorName string
    The name of the author.
    AuthoredDate string
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    CommittedDate string
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    CommitterEmail string
    The email of the user that committed.
    CommitterName string
    The name of the user that committed.
    Id string
    The unique id assigned to the commit by Gitlab.
    Message string
    The commit message
    ParentIds List<string>
    The id of the parents of the commit
    ShortId string
    The short id assigned to the commit by Gitlab.
    Title string
    The title of the commit
    AuthorEmail string
    The email of the author.
    AuthorName string
    The name of the author.
    AuthoredDate string
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    CommittedDate string
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    CommitterEmail string
    The email of the user that committed.
    CommitterName string
    The name of the user that committed.
    Id string
    The unique id assigned to the commit by Gitlab.
    Message string
    The commit message
    ParentIds []string
    The id of the parents of the commit
    ShortId string
    The short id assigned to the commit by Gitlab.
    Title string
    The title of the commit
    authorEmail String
    The email of the author.
    authorName String
    The name of the author.
    authoredDate String
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    committedDate String
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    committerEmail String
    The email of the user that committed.
    committerName String
    The name of the user that committed.
    id String
    The unique id assigned to the commit by Gitlab.
    message String
    The commit message
    parentIds List<String>
    The id of the parents of the commit
    shortId String
    The short id assigned to the commit by Gitlab.
    title String
    The title of the commit
    authorEmail string
    The email of the author.
    authorName string
    The name of the author.
    authoredDate string
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    committedDate string
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    committerEmail string
    The email of the user that committed.
    committerName string
    The name of the user that committed.
    id string
    The unique id assigned to the commit by Gitlab.
    message string
    The commit message
    parentIds string[]
    The id of the parents of the commit
    shortId string
    The short id assigned to the commit by Gitlab.
    title string
    The title of the commit
    author_email str
    The email of the author.
    author_name str
    The name of the author.
    authored_date str
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    committed_date str
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    committer_email str
    The email of the user that committed.
    committer_name str
    The name of the user that committed.
    id str
    The unique id assigned to the commit by Gitlab.
    message str
    The commit message
    parent_ids Sequence[str]
    The id of the parents of the commit
    short_id str
    The short id assigned to the commit by Gitlab.
    title str
    The title of the commit
    authorEmail String
    The email of the author.
    authorName String
    The name of the author.
    authoredDate String
    The date which the commit was authored (format: yyyy-MM-ddTHH:mm:ssZ).
    committedDate String
    The date at which the commit was pushed (format: yyyy-MM-ddTHH:mm:ssZ).
    committerEmail String
    The email of the user that committed.
    committerName String
    The name of the user that committed.
    id String
    The unique id assigned to the commit by Gitlab.
    message String
    The commit message
    parentIds List<String>
    The id of the parents of the commit
    shortId String
    The short id assigned to the commit by Gitlab.
    title String
    The title of the commit

    Package Details

    Repository
    GitLab pulumi/pulumi-gitlab
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the gitlab Terraform Provider.
    gitlab logo
    GitLab v8.4.1 published on Tuesday, Sep 24, 2024 by Pulumi