Skip to content

Add branch commands #176

@Leynch

Description

@Leynch

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions