Github Delete Branch
github_delete_branchDeletes a repository branch while refusing default branches and open pull request sources unless forced, preventing accidental pull request closure.
Instructions
Deletes a branch. The default branch is always refused. A branch an open pull request comes from is refused unless force is set, because deleting it closes that pull request. See #536.
Workflow and conventions: github_get_skill('pr-management').
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"repo_owner": "<repo_owner>",
"repo_name": "<repo_name>",
"branch": "<branch>"
},
"name": "github_delete_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| force | No | Delete the branch even though an open pull request comes from it | |
| branch | Yes | ||
| repo_name | Yes | ||
| repo_owner | Yes | ||
| expected_head_sha | No | Refuse unless the head still matches this SHA |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||