Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
branch
input handler
Synopsis
- data CreateFrom
- handleBranch :: BranchSourceI -> ProjectAndBranch (Maybe ProjectName) ProjectBranchName -> Cli ()
- createBranch :: Text -> CreateFrom -> Project -> Transaction ProjectBranchName -> Cli (ProjectBranchId, ProjectBranchName)
Documentation
data CreateFrom Source #
handleBranch :: BranchSourceI -> ProjectAndBranch (Maybe ProjectName) ProjectBranchName -> Cli () Source #
Create a new project branch from an existing project branch or namespace.
createBranch :: Text -> CreateFrom -> Project -> Transaction ProjectBranchName -> Cli (ProjectBranchId, ProjectBranchName) Source #
createBranch description createFrom project getNewBranchName
:
- Creates a new branch row in
project
at the name fromgetNewBranchName
(failing if branch already exists inproject
). - Switches to the new branch.
This bit of functionality is factored out from the main handleBranch
handler because it is also called by the
release.draft
command, which essentially just creates a branch, but with some different output for the user.
Returns the branch id and name of the newly-created branch.