Protect Branch
gitlab_protect_branchProtect a GitLab branch or wildcard rule by configuring role-based push, merge, and unprotect access to control who can change protected refs.
Instructions
Protect a branch or wildcard rule and configure role-based push, merge, and unprotect access.
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_protect_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| branch | Yes | ||
| project_id | No | ||
| allow_force_push | No | ||
| push_access_level | No | ||
| merge_access_level | No | ||
| unprotect_access_level | No | ||
| code_owner_approval_required | No |