protect_branch
Configure branch protection in GitLab by setting push and merge access levels, force push permissions, and code owner approval requirements.
Instructions
Protect a branch in a GitLab project
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_id | No | Project ID or URL-encoded path | |
| name | No | Branch name or wildcard | |
| push_access_level | No | Access level for push (0=No one, 30=Developers, 40=Maintainers) | |
| merge_access_level | No | Access level for merge | |
| allow_force_push | No | Allow force push | |
| code_owner_approval_required | No | Require code owner approval |