Update Protected Branch
gitlab_update_protected_branchUpdate an existing GitLab protected branch rule to change force push, code owner approval, and allowed push, merge, or unprotect entries; add, modify, or remove access entries safely.
Instructions
Change an existing branch protection rule in place: allow_force_push, code_owner_approval_required, and allowed_to_push/allowed_to_merge/allowed_to_unprotect entries. Add an entry with one of access_level, user_id, group_id, or deploy_key_id (push only); change one with its id; remove one with {id, _destroy: true}. Read entry ids with gitlab_get_protected_branch. Changes that would leave nobody allowed to unprotect are refused.
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": {
"branch": "<branch>"
},
"name": "gitlab_update_protected_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | ||
| project_id | No | ||
| allowed_to_push | No | ||
| allow_force_push | No | ||
| allowed_to_merge | No | ||
| allowed_to_unprotect | No | ||
| code_owner_approval_required | No |