Claude-skill-registry gitlab-protected-branches
Manages protected branches in GitLab. Use for protecting/unprotecting branches, code owner approvals. Triggers: branch protection.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/gitlab-protected-branches" ~/.claude/skills/majiayu000-claude-skill-registry-gitlab-protected-branches && rm -rf "$T"
manifest:
skills/data/gitlab-protected-branches/SKILL.mdsource content
Overview
Secures branches.
Available Tools
: Retrieve a list of protected branches in a specific GitLab project or Retrieve details of a specific protected branch in a GitLab project..get_protected_branches- Parameters:
(str): Optional. - Project ID or pathproject_id
(Optional[str]): Optional. - Name of the branch to retrieve (e.g., 'main')branch
- Parameters:
: Protect a specific branch in a GitLab project with specified access levels.protect_branch- Parameters:
(str): Optional. - Project ID or pathproject_id
(str): Optional. - Name of the branch to protect (e.g., 'main')branch
(Optional[str]): Optional. - Access level for pushing (e.g., 'maintainer')push_access_level
(Optional[str]): Optional. - Access level for merging (e.g., 'developer')merge_access_level
(Optional[str]): Optional. - Access level for unprotecting (e.g., 'maintainer')unprotect_access_level
(Optional[bool]): Optional. - Whether force pushes are allowedallow_force_push
(Optional[List[Dict]]): Optional. - List of users or groups allowed to pushallowed_to_push
(Optional[List[Dict]]): Optional. - List of users or groups allowed to mergeallowed_to_merge
(Optional[List[Dict]]): Optional. - List of users or groups allowed to unprotectallowed_to_unprotect
(Optional[bool]): Optional. - Whether code owner approval is requiredcode_owner_approval_required
(Optional[Context]): Optional. - MCP context for progressctx
- Parameters:
: Unprotect a specific branch in a GitLab project.unprotect_branch- Parameters:
(str): Optional. - Project ID or pathproject_id
(str): Optional. - Name of the branch to unprotect (e.g., 'main')branch
(Optional[Context]): Optional. - MCP context for progressctx
- Parameters:
: Require or disable code owner approvals for a specific branch in a GitLab project.require_code_owner_approvals_single_branch- Parameters:
(str): Optional. - Project ID or pathproject_id
(str): Optional. - Name of the branch to set approval requirements for (e.g., 'main')branch
(bool): Optional. - Whether code owner approval is requiredcode_owner_approval_required
(Optional[Context]): Optional. - MCP context for progressctx
- Parameters:
Usage Instructions
- Access levels: push/merge.
Examples
- Protect:
with project_id="123", branch="main", push_access_level="maintainer".protect_branch - Code owners:
with code_owner_approval_required=true.require_code_owner_approvals_single_branch
Error Handling
- Already protected: Update instead.