Protect branch
gitlab_protect_branchProtect a GitLab project branch to prevent unauthorized changes. Specify project_id and branch to apply branch protection through the GitLab API.
Instructions
Protect a specific branch in a project.
Args: **kwargs: Additional parameters for the request (e.g., project_id, branch).
Returns: Response: A wrapper containing the original response and a Branch model.
Raises: MissingParameterError: If the project_id or branch is missing. ParameterError: If invalid parameters are provided.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gitlab_protect_branch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ref | No | ||
| page | No | ||
| branch | No | ||
| per_page | No | ||
| max_pages | No | ||
| project_id | No |