delete_branch
Delete a Git branch in a Bitbucket repository by workspace, repository, and branch name. Pass expected_head (commit SHA) to skip the head lookup and avoid deleting a moved branch.
Instructions
Delete a branch. Pass expected_head (commit SHA) to skip the lookup call (Server).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| workspace | Yes | Project key (e.g., PROJ) | |
| repository | Yes | Repository slug | |
| branch_name | Yes | ||
| expected_head | No | Known head SHA (compare-and-swap) |