ブランチコマンド

mabl CLIでのブランチの管理

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