mb.merge_deployment(name, to_branch, ...)
Merges the latest version of a deployment from one branch to another.
Parameters
name
:str
The name of the deployment.to_branch
:str
The name of the destination branch for merging the deployment.from_branch
:Optional[str]
The name of the origin branch for merging the deployment. By default the current branch (defaultmain
) is used.
Notes
Users with Maintainer
and Owner
roles can merge deployments to protected branches. Users with the User
role can only merge to unprotected branches.
Returns
No value is returned. A success status message is printed if the command is successful.
Examples
Merge a deployment to the prod
branch
mb.merge_deployment("example_deployment", to_branch="prod")
Merge a deployment from the staging
branch to the prod
branch
mb.merge_deployment("example_deployment", from_branch="staging", to_branch="prod")