Loading...
Loading...
Create and manage GitLab issues, merge requests, pipelines, and repositories using the glab CLI. Use when asked to open an MR, review a merge request, check CI/CD pipelines, list issues, or manage code review on GitLab.
npx skill4agent add odyssey4me/agent-skills gitlabglabglab# Authenticate with GitLab
glab auth login
# Verify authentication
glab auth statusscripts/gitlab.pyglab# Check glab CLI is installed and authenticated
$SKILL_DIR/scripts/gitlab.py check
# Issues
$SKILL_DIR/scripts/gitlab.py issues list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py issues view 123 --repo GROUP/REPO
# Merge Requests
$SKILL_DIR/scripts/gitlab.py mrs list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py mrs view 456 --repo GROUP/REPO
# Pipelines
$SKILL_DIR/scripts/gitlab.py pipelines list --repo GROUP/REPO
$SKILL_DIR/scripts/gitlab.py pipelines view 123456 --repo GROUP/REPO
# Repositories
$SKILL_DIR/scripts/gitlab.py repos list
$SKILL_DIR/scripts/gitlab.py repos view GROUP/REPO--limit Nglabglab issue list # List issues
glab issue view 123 # View issue details
glab issue create # Create new issue
glab issue note 123 # Add comment
glab issue close 123 # Close issue
glab issue update 123 --label bug # Edit issueglab mr list # List merge requests
glab mr view 456 # View MR details
glab mr create # Create new MR
glab mr approve 456 # Approve MR
glab mr merge 456 # Merge MR
glab mr checkout 456 # Checkout MR branch
glab mr diff 456 # View MR diff
glab mr note 456 # Add comment to MRglab ci list # List pipelines
glab ci view 123456 # View pipeline details
glab ci run # Trigger pipeline
glab ci trace # Watch pipeline logs
glab ci retry 123456 # Retry failed pipeline
glab ci status # Show pipeline statusglab repo list # List repositories
glab repo view GROUP/REPO # View repository
glab repo create # Create repository
glab repo clone GROUP/REPO # Clone repository
glab repo fork GROUP/REPO # Fork repositoryglab release list # List releases
glab release view v1.0.0 # View release details
glab release create v1.0.0 # Create release
glab release delete v1.0.0 # Delete release# List MRs assigned to you
glab mr list --assignee=@me
# Review a specific MR
$SKILL_DIR/scripts/gitlab.py mrs view 456
glab mr diff 456
glab mr approve 456
# Verify approval was recorded
$SKILL_DIR/scripts/gitlab.py mrs view 456 # check approval status# Create issue
glab issue create --title "Bug: Login fails" --description "Description" --label bug
# Verify: note the issue number from output
# Create MR that closes it (use issue number from above)
glab mr create --title "Fix login bug" --description "Closes #123"
# Verify MR was created and linked
$SKILL_DIR/scripts/gitlab.py mrs view <number># Check current pipeline status
glab ci status
# Watch pipeline logs in real-time
glab ci trace
# Retry failed jobs
glab ci retry
# Verify pipeline restarted
$SKILL_DIR/scripts/gitlab.py pipelines list# Get JSON output
glab issue list --output json
# Process with jq
glab mr list --output json | jq '.[] | "\(.iid): \(.title)"'# Make authenticated API request
glab api projects/:id/issues
# POST request
glab api projects/:id/issues -X POST -f title="Issue" -f description="Text"
# Process response
glab api projects/:id | jq '.star_count'# Create shortcuts
glab alias set mrs 'mr list --assignee=@me'
glab alias set issues 'issue list --assignee=@me'
glab alias set pipelines 'ci list'
# Use them
glab mrs
glab issues
glab pipelines# View configuration
glab config get
# Set default editor
glab config set editor vim
# Set default Git protocol
glab config set git_protocol ssh~/.config/glab-cli/config.yml# Check authentication
glab auth status
# Re-authenticate
glab auth login
# Enable debug logging
DEBUG=1 glab issue list
# Check glab version
glab version