π¦ ClawHub
Gitlab Manager
by @jorgermp
Manage GitLab repositories, merge requests, and issues via API. Use for tasks like creating repos, reviewing code in MRs, or tracking issues.
TERMINAL
clawhub install gitlab-managerπ About This Skill
name: gitlab-manager description: Manage GitLab repositories, merge requests, and issues via API. Use for tasks like creating repos, reviewing code in MRs, or tracking issues.
GitLab Manager
This skill allows interaction with GitLab.com via the API.
Prerequisites
api scope must be set in the environment.Usage
Use the provided Node.js script to interact with GitLab.
Script Location
scripts/gitlab_api.jsCommands
#### 1. Create Repository Create a new project in GitLab.
./scripts/gitlab_api.js create_repo "" "" ""
Visibility: private (default), public, internal
#### 2. List Merge Requests List MRs for a specific project.
./scripts/gitlab_api.js list_mrs "" "[state]"
Project path: e.g., "jorgermp/my-repo" (will be URL encoded automatically)
State: opened (default), closed, merged, all
#### 3. Comment on Merge Request Add a comment (note) to a specific MR. Useful for code review.
./scripts/gitlab_api.js comment_mr "" ""
#### 4. Create Issue Open a new issue.
./scripts/gitlab_api.js create_issue "" "" ""
Examples
Create a private repo:
GITLAB_TOKEN=... ./scripts/gitlab_api.js create_repo "new-tool" "A cool new tool" "private"
Review an MR:
# First list to find ID
GITLAB_TOKEN=... ./scripts/gitlab_api.js list_mrs "jorgermp/my-tool" "opened"
Then comment
GITLAB_TOKEN=... ./scripts/gitlab_api.js comment_mr "jorgermp/my-tool" 1 "Great work, but check indentation."
π‘ Examples
Create a private repo:
GITLAB_TOKEN=... ./scripts/gitlab_api.js create_repo "new-tool" "A cool new tool" "private"
Review an MR:
# First list to find ID
GITLAB_TOKEN=... ./scripts/gitlab_api.js list_mrs "jorgermp/my-tool" "opened"
Then comment
GITLAB_TOKEN=... ./scripts/gitlab_api.js comment_mr "jorgermp/my-tool" 1 "Great work, but check indentation."
βοΈ Configuration
api scope must be set in the environment.