cli icon indicating copy to clipboard operation
cli copied to clipboard

Add branch commands

Open Leynch opened this issue 5 months ago • 0 comments

Description

I like to use the structurizr cli in my CI/CD pipelines for pushing workspaces to branches and clean them up (e.g. after merge-requests finished).

Currently, Structurizr CLI does not support listing and deletion of workspace branches. It would be nice if it does to make it possible to clean up Structurizr OnPremises instances (and also Cloud?).

Depends on Feature-Request 184 in OnPremise

Proposed Changes

Add following Commands (like the other commands) in src/main/java/com/structurizr/cli:

  • ListBranchesCommand
    • options
      • url
      • id (required)
      • key (required)
      • secret (required)
      • debug
  • DeleteBranchCommand
    • options
      • url
      • id (required)
      • key (required)
      • secret (required)
      • branch (required)
      • debug

Expected Outcome

The command structurizr.sh list-branches -url <url> -id <id> -key <key> -secret <secret> should list all branches of a workspace -> ["branch-1","test-branch"].

The command structurizr.sh delete-branch -url <url> -id <id> -key <key> -secret <secret> -branch <branch> should delete a single branch.

Priority

Low (I'm willing to make a pull request - please confirm approach first)

More information

Leynch avatar Jul 01 '25 13:07 Leynch