mabl CLIでは、ワークスペースのブランチのリスト表示、クエリ、作成、マージをプログラムで実行できます。
mabl branches list
mabl branches list
コマンドは、ブランチID、ブランチ名、ブランチステータス、ブランチの作成日時のリストを返します。
オプション
オプション | 説明 |
---|---|
--limit , -l
|
返すブランチの数。デフォルトは10です。 |
--output , -o
|
出力形式を指定します。"json" または "yaml" のいずれかを指定できます。 |
--status , -s
|
ステータス ("open" または "merged") で結果をフィルタリングします。 |
例
# List branches in JSON format mabl branches list --output json # List open branches mabl branches list --status open
mabl branches describe
mabl branches describe
コマンドは、そのブランチに存在するバージョン、テスト、フローのリストを返します。
オプション
オプション | 説明 |
---|---|
--name , -n
|
ブランチ名を使ってブランチに関する詳細情報を取得します。ブランチIDを指定する代わりに、このオプションを使用することができます。 |
--output , -o
|
ブランチデータの出力の種類を指定します。"json" または "yaml" のいずれかを指定できます。 |
例
# Get branch details in JSON format mabl branches describe {ブランチID} --output json # Get branch details by branch name mabl branches describe --name {ブランチ名}
mabl branches create
mabl branches create
コマンドは、mablブランチを新規に作成し、ブランチID、ステータス、作成日時、作成者のIDなど、ブランチの詳細を返します。
オプション
オプション | 説明 |
---|---|
--output , -o
|
ブランチデータの出力の種類を指定します。"json" または "yaml" のいずれかを指定できます。 |
例
# Create a mabl branch and return details in JSON format mabl branches create {名前} --output json
mabl branches merge
mabl branches merge
コマンドは、mablブランチをマージし、マージ元のブランチからマージ先のブランチにマージされたテストとフローのリストを返します。
オプション
オプション | 説明 |
---|---|
--from , -f
|
マージ元のmablブランチの名前 |
--to , -t
|
マージ先のmablブランチの名前 |
--output , -o
|
ブランチデータの出力の種類を指定します。"json" または "yaml" のいずれかを指定できます。 |
例
# Merge a branch to master and return output in JSON format mabl branches merge --from {ブランチ名} --output json # Merge a branch called "test-branch" into a branch called "other-branch" mabl branches merge --from test-branch --to other-branch