public interface

BranchModel

com.atlassian.stash.branch.model.BranchModel

Class Overview

Represents a branch model associated with a Stash repository. The branch model describes special semantics that some branches in a repository may have, such as development branch ('HEAD'), production branch (A.K.A. deployment), feature branch, bugfix branch etc.

A branch model applied to a repository classifies its branches as one of the 2 significant branches (Development or Production), or into one of the branch types, which can be used to facilitate various workflows in that repository.

Summary

Public Methods
@Nonnull BranchClassifier getClassifier()
Get the branch classifier associated with this branch model.
@Nonnull Branch getDevelopment()
Get the development branch associated with the repository.
@Nullable Branch getProduction()
Get the production branch associated with the repository.
@Nonnull Set<BranchType> getTypes()
Get a set of branch types associated with the repository.

Public Methods

@Nonnull public BranchClassifier getClassifier ()

Get the branch classifier associated with this branch model.

Returns
  • branch classifier used to assign branches to branch types in this branch model

@Nonnull public Branch getDevelopment ()

Get the development branch associated with the repository. Development branch is a potentially unstable branch where the work on the next version of the software is happening.

Returns
  • the development branch of the associated repository

@Nullable public Branch getProduction ()

Get the production branch associated with the repository. Production branch is a stable branch from which production-ready versions of the software are released or deployed to the production environment.

Returns
  • the production branch of the associated repository

@Nonnull public Set<BranchType> getTypes ()

Get a set of branch types associated with the repository. Branch types represent distinct sets of branches that are created for some specific purpose, e.g. adding new features, or fixing bugs.

Returns
  • set of enabled branch types of the associated repository