In the mabl CLI, you can programmatically list, query, create, and merge branches from your workspace.
mabl branches list
The mabl branches list
command returns a list of branch IDs, names, branch statuses and the date the branch was created.
Options
Option | Description |
---|---|
--limit , -l
|
Number of branches to return. The default is 10. |
--output , -o
|
Specify the output format: "json" or "yaml" |
--status , -s
|
Filter the results by status: "open" or "merged" |
Examples
# List branches in JSON format mabl branches list --output json # List open branches mabl branches list --status open
mabl branches describe
The mabl branches describe
command returns a list of the versions, tests, and flows that exist on the branch.
Options
Option | Description |
---|---|
--name , -n
|
Get details about the branch by its name. You can use this instead of providing the branch ID. |
--output , -o
|
Specify an output type for the branch data: "json" or "yaml" |
Examples
# Get branch details in JSON format mabl branches describe {branch-id} --output json # Get branch details by branch name mabl branches describe --name {branch-name}
mabl branches create
The mabl branches create
command creates a new mabl branch and returns branch details, including branch ID, status, created time and the ID of the creator.
Options
Option | Description |
---|---|
--output , -o
|
Specify an output type for the branch data: "json" or "yaml" |
Examples
# Create a mabl branch and return details in JSON format mabl branches create {name} --output json
mabl branches merge
The mabl branches merge
command merges mabl branches and returns a list of tests and flows that were merged from the source branch to the destination branch.
Options
Option | Description |
---|---|
--from , -f
|
Name of the mabl branch to merge from |
--to , -t
|
Name of the mabl branch to merge to |
--output , -o
|
Specify an output type for the branch data: "json" or "yaml" |
Examples
# Merge a branch to master and return output in JSON format mabl branches merge --from {branch-name} --output json # Merge a branch called "test-branch" into a branch called "other-branch" mabl branches merge --from test-branch --to other-branch