Update protected branch
update_protected_branchUpdate branch protection policies after reading current policy, requiring explicit acknowledgement and an unprotect rule to prevent accidental changes.
Instructions
Update protected-branch policy only after reading the current policy. An explicit acknowledgement and unprotect rule are required.
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": {
"project": "<project>",
"name": "<name>",
"allowed_to_unprotect": "<allowed_to_unprotect>",
"acknowledge_protection_change": "<acknowledge_protection_change>"
},
"name": "update_protected_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| project | Yes | GitLab project ID or full path such as group/project. | |
| allowed_to_push | No | ||
| allow_force_push | No | ||
| allowed_to_merge | No | ||
| allowed_to_unprotect | Yes | ||
| code_owner_approval_required | No | ||
| acknowledge_protection_change | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | GitLab response normalized for model use. |