gitlab-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GitLab Assistant

GitLab 助手

Central hub for GitLab automation using the
glab
CLI. Routes requests to the most appropriate specialized skill.
基于
glab
CLI的GitLab自动化中心,可将请求路由至最合适的专门技能模块。

Quick Reference

快速参考

I want to...Use this skillRisk
Work with merge requests
gitlab-mr
⚠️
Work with issues
gitlab-issue
⚠️
Check/run CI pipelines
gitlab-ci
⚠️
Clone/fork/create repos
gitlab-repo
⚠️
Manage releases
gitlab-release
⚠️
Manage labels
gitlab-label
⚠️
Manage milestones
gitlab-milestone
⚠️
Manage CI/CD variables
gitlab-variable
⚠️
Manage groups/teams
gitlab-group
⚠️
Search GitLab
gitlab-search
-
Protect branches
gitlab-protected-branch
⚠️
Manage webhooks
gitlab-webhook
⚠️
Repository file operations
gitlab-file
⚠️
Manage wiki pages
gitlab-wiki
⚠️
MR/Issue discussions
gitlab-discussion
⚠️
Project badges
gitlab-badge
⚠️
Container registry
gitlab-container
⚠️⚠️
Security vulnerabilities
gitlab-vulnerability
⚠️
Risk Legend: - Safe | ⚠️ Caution | ⚠️⚠️ Warning | ⚠️⚠️⚠️ Danger
我想要...使用该技能模块风险
处理合并请求
gitlab-mr
⚠️
处理议题
gitlab-issue
⚠️
查看/运行CI流水线
gitlab-ci
⚠️
克隆/复刻/创建仓库
gitlab-repo
⚠️
管理版本发布
gitlab-release
⚠️
管理标签
gitlab-label
⚠️
管理里程碑
gitlab-milestone
⚠️
管理CI/CD变量
gitlab-variable
⚠️
管理群组/团队
gitlab-group
⚠️
搜索GitLab内容
gitlab-search
-
保护分支
gitlab-protected-branch
⚠️
管理Webhook
gitlab-webhook
⚠️
仓库文件操作
gitlab-file
⚠️
管理Wiki页面
gitlab-wiki
⚠️
MR/议题讨论
gitlab-discussion
⚠️
项目徽章
gitlab-badge
⚠️
容器镜像仓库
gitlab-container
⚠️⚠️
安全漏洞管理
gitlab-vulnerability
⚠️
风险说明: - 安全 | ⚠️ 注意 | ⚠️⚠️ 警告 | ⚠️⚠️⚠️ 危险

Routing Rules

路由规则

Rule 1: Explicit Resource Type

规则1:明确资源类型

Route based on the GitLab resource being worked with:
KeywordsRoute to
MR, merge request, pull request, review, approve, merge
gitlab-mr
issue, bug, ticket, task, feature request
gitlab-issue
CI, CD, pipeline, build, job, deploy, artifacts
gitlab-ci
repo, repository, project, clone, fork
gitlab-repo
release, tag, version, changelog
gitlab-release
label, tag (for issues/MRs)
gitlab-label
milestone, sprint, iteration
gitlab-milestone
variable, secret, env, CI variable
gitlab-variable
group, team, organization, members, namespace
gitlab-group
search, find, query (global/group/project)
gitlab-search
protect branch, branch protection, access rules
gitlab-protected-branch
webhook, hook, notification callback, integration
gitlab-webhook
file, blob, content, raw (repository files)
gitlab-file
wiki, documentation page
gitlab-wiki
discussion, thread, comment, note, reply
gitlab-discussion
badge, status badge, coverage badge
gitlab-badge
container, registry, docker, image, tag (container)
gitlab-container
vulnerability, security, scan, CVE, SAST, DAST
gitlab-vulnerability
根据操作的GitLab资源类型进行路由:
关键词路由至
MR, merge request, pull request, review, approve, merge
gitlab-mr
issue, bug, ticket, task, feature request
gitlab-issue
CI, CD, pipeline, build, job, deploy, artifacts
gitlab-ci
repo, repository, project, clone, fork
gitlab-repo
release, tag, version, changelog
gitlab-release
label, tag(用于议题/MR分类)
gitlab-label
milestone, sprint, iteration
gitlab-milestone
variable, secret, env, CI variable
gitlab-variable
group, team, organization, members, namespace
gitlab-group
search, find, query(全局/群组/项目范围)
gitlab-search
protect branch, branch protection, access rules
gitlab-protected-branch
webhook, hook, notification callback, integration
gitlab-webhook
file, blob, content, raw(仓库文件)
gitlab-file
wiki, documentation page
gitlab-wiki
discussion, thread, comment, note, reply
gitlab-discussion
badge, status badge, coverage badge
gitlab-badge
container, registry, docker, image, tag(容器)
gitlab-container
vulnerability, security, scan, CVE, SAST, DAST
gitlab-vulnerability

Rule 2: Common Workflows

规则2:常见工作流

WorkflowSkills Involved
Code review
gitlab-mr
(checkout, review, approve, merge)
Bug tracking
gitlab-issue
(create, assign, close)
Deployment
gitlab-ci
(run, status, artifacts)
Release process
gitlab-release
+
gitlab-ci
Project setup
gitlab-repo
(create, clone)
工作流涉及的技能模块
代码评审
gitlab-mr
(检出、评审、批准、合并)
缺陷追踪
gitlab-issue
(创建、分配、关闭)
部署
gitlab-ci
(运行、状态查看、制品下载)
发布流程
gitlab-release
+
gitlab-ci
项目初始化
gitlab-repo
(创建、克隆)

Rule 3: Multi-Step Operations

规则3:多步骤操作

For complex workflows that span multiple skills, coordinate them:
Example: "Release version 1.2.0"
1. gitlab-mr: Ensure all MRs are merged
2. gitlab-ci: Verify pipeline passes
3. gitlab-release: Create release with changelog
对于跨多个技能模块的复杂工作流,需协同执行:
示例:"发布版本1.2.0"
1. gitlab-mr:确保所有MR已合并
2. gitlab-ci:验证流水线执行通过
3. gitlab-release:创建带更新日志的版本发布

Skills Overview

技能模块概览

gitlab-mr (Merge Requests)

gitlab-mr(合并请求)

  • Purpose: Create, review, approve, and merge MRs
  • Key commands:
    glab mr list
    ,
    glab mr create
    ,
    glab mr checkout
    ,
    glab mr merge
  • Risk: ⚠️ (merge is destructive)
  • Triggers: MR, merge request, review, approve, merge, checkout
  • 用途:创建、评审、批准和合并MR
  • 核心命令
    glab mr list
    ,
    glab mr create
    ,
    glab mr checkout
    ,
    glab mr merge
  • 风险:⚠️(合并操作具有破坏性)
  • 触发词:MR, merge request, review, approve, merge, checkout

gitlab-issue (Issues)

gitlab-issue(议题)

  • Purpose: Track bugs, features, and tasks
  • Key commands:
    glab issue list
    ,
    glab issue create
    ,
    glab issue close
  • Risk: ⚠️ (close/delete are destructive)
  • Triggers: issue, bug, task, ticket, feature
  • 用途:追踪缺陷、需求和任务
  • 核心命令
    glab issue list
    ,
    glab issue create
    ,
    glab issue close
  • 风险:⚠️(关闭/删除操作具有破坏性)
  • 触发词:issue, bug, task, ticket, feature

gitlab-ci (CI/CD Pipelines)

gitlab-ci(CI/CD流水线)

  • Purpose: View, trigger, and manage CI/CD pipelines
  • Key commands:
    glab ci status
    ,
    glab ci view
    ,
    glab ci run
    ,
    glab ci artifact
  • Risk: ⚠️ (run triggers compute resources)
  • Triggers: CI, pipeline, build, job, deploy, artifacts, lint
  • 用途:查看、触发和管理CI/CD流水线
  • 核心命令
    glab ci status
    ,
    glab ci view
    ,
    glab ci run
    ,
    glab ci artifact
  • 风险:⚠️(运行会占用计算资源)
  • 触发词:CI, pipeline, build, job, deploy, artifacts, lint

gitlab-repo (Repositories)

gitlab-repo(仓库)

  • Purpose: Clone, fork, create, and manage repositories
  • Key commands:
    glab repo clone
    ,
    glab repo fork
    ,
    glab repo create
  • Risk: ⚠️⚠️ (delete is highly destructive)
  • Triggers: repo, repository, project, clone, fork
  • 用途:克隆、复刻、创建和管理仓库
  • 核心命令
    glab repo clone
    ,
    glab repo fork
    ,
    glab repo create
  • 风险:⚠️⚠️(删除操作极具破坏性)
  • 触发词:repo, repository, project, clone, fork

gitlab-release (Releases)

gitlab-release(版本发布)

  • Purpose: Create and manage releases
  • Key commands:
    glab release create
    ,
    glab release list
    ,
    glab release view
  • Risk: ⚠️ (creates tags and releases)
  • Triggers: release, version, changelog, tag
  • 用途:创建和管理版本发布
  • 核心命令
    glab release create
    ,
    glab release list
    ,
    glab release view
  • 风险:⚠️(会创建标签和发布记录)
  • 触发词:release, version, changelog, tag

gitlab-label (Labels)

gitlab-label(标签)

  • Purpose: Manage project labels
  • Key commands:
    glab label create
    ,
    glab label list
  • Risk: ⚠️ (affects issue/MR categorization)
  • Triggers: label, tag (for categorization)
  • 用途:管理项目标签
  • 核心命令
    glab label create
    ,
    glab label list
  • 风险:⚠️(会影响议题/MR的分类)
  • 触发词:label, tag(用于分类)

gitlab-milestone (Milestones)

gitlab-milestone(里程碑)

  • Purpose: Manage project milestones
  • Key commands:
    glab milestone create
    ,
    glab milestone list
  • Risk: ⚠️ (affects planning)
  • Triggers: milestone, sprint, iteration
  • 用途:管理项目里程碑
  • 核心命令
    glab milestone create
    ,
    glab milestone list
  • 风险:⚠️(会影响项目规划)
  • 触发词:milestone, sprint, iteration

gitlab-variable (CI/CD Variables)

gitlab-variable(CI/CD变量)

  • Purpose: Manage CI/CD variables and secrets
  • Key commands:
    glab variable set
    ,
    glab variable list
  • Risk: ⚠️⚠️ (contains secrets)
  • Triggers: variable, secret, env var, CI variable
  • 用途:管理CI/CD变量和密钥
  • 核心命令
    glab variable set
    ,
    glab variable list
  • 风险:⚠️⚠️(包含敏感密钥)
  • 触发词:variable, secret, env var, CI variable

gitlab-group (Groups - API)

gitlab-group(群组 - API)

  • Purpose: Manage groups, members, subgroups via API
  • Key commands:
    glab api groups
    ,
    glab api groups/:id/members
  • Risk: ⚠️ (group management)
  • Triggers: group, team, organization, members, namespace
  • 用途:通过API管理群组、成员、子群组
  • 核心命令
    glab api groups
    ,
    glab api groups/:id/members
  • 风险:⚠️(群组管理操作)
  • 触发词:group, team, organization, members, namespace

gitlab-search (Search - API)

gitlab-search(搜索 - API)

  • Purpose: Search across GitLab (projects, issues, code, etc.)
  • Key commands:
    glab api "search?scope=...&search=..."
  • Risk: - (read-only)
  • Triggers: search, find, query
  • 用途:跨GitLab搜索(项目、议题、代码等)
  • 核心命令
    glab api "search?scope=...&search=..."
  • 风险:-(只读操作)
  • 触发词:search, find, query

gitlab-protected-branch (Protected Branches - API)

gitlab-protected-branch(受保护分支 - API)

  • Purpose: Manage branch protection rules
  • Key commands:
    glab api projects/:id/protected_branches
  • Risk: ⚠️ (affects branch access)
  • Triggers: protect branch, branch protection, access rules
  • 用途:管理分支保护规则
  • 核心命令
    glab api projects/:id/protected_branches
  • 风险:⚠️(会影响分支访问权限)
  • 触发词:protect branch, branch protection, access rules

gitlab-webhook (Webhooks - API)

gitlab-webhook(Webhook - API)

  • Purpose: Manage project webhooks
  • Key commands:
    glab api projects/:id/hooks
  • Risk: ⚠️ (external integrations)
  • Triggers: webhook, hook, notification, integration
  • 用途:管理项目Webhook
  • 核心命令
    glab api projects/:id/hooks
  • 风险:⚠️(涉及外部集成)
  • 触发词:webhook, hook, notification, integration

gitlab-file (Repository Files - API)

gitlab-file(仓库文件 - API)

  • Purpose: Read/write repository files via API
  • Key commands:
    glab api projects/:id/repository/files/:path
  • Risk: ⚠️ (modifies files)
  • Triggers: file, blob, content, raw
  • 用途:通过API读写仓库文件
  • 核心命令
    glab api projects/:id/repository/files/:path
  • 风险:⚠️(会修改文件内容)
  • 触发词:file, blob, content, raw

gitlab-wiki (Wiki - API)

gitlab-wiki(Wiki - API)

  • Purpose: Manage project wiki pages
  • Key commands:
    glab api projects/:id/wikis
  • Risk: ⚠️ (documentation changes)
  • Triggers: wiki, documentation page
  • 用途:管理项目Wiki页面
  • 核心命令
    glab api projects/:id/wikis
  • 风险:⚠️(会修改文档内容)
  • 触发词:wiki, documentation page

gitlab-discussion (Discussions - API)

gitlab-discussion(讨论 - API)

  • Purpose: Manage threaded discussions on MRs/issues
  • Key commands:
    glab api projects/:id/merge_requests/:iid/discussions
  • Risk: ⚠️ (comments)
  • Triggers: discussion, thread, comment, note, reply
  • 用途:管理MR/议题上的线程式讨论
  • 核心命令
    glab api projects/:id/merge_requests/:iid/discussions
  • 风险:⚠️(会添加评论内容)
  • 触发词:discussion, thread, comment, note, reply

gitlab-badge (Badges - API)

gitlab-badge(徽章 - API)

  • Purpose: Manage project badges
  • Key commands:
    glab api projects/:id/badges
  • Risk: ⚠️ (project display)
  • Triggers: badge, status badge, coverage badge
  • 用途:管理项目徽章
  • 核心命令
    glab api projects/:id/badges
  • 风险:⚠️(会影响项目展示)
  • 触发词:badge, status badge, coverage badge

gitlab-container (Container Registry - API)

gitlab-container(容器镜像仓库 - API)

  • Purpose: Manage container registry images and tags
  • Key commands:
    glab api projects/:id/registry/repositories
  • Risk: ⚠️⚠️ (delete images is destructive)
  • Triggers: container, registry, docker, image
  • 用途:管理容器镜像仓库中的镜像和标签
  • 核心命令
    glab api projects/:id/registry/repositories
  • 风险:⚠️⚠️(删除镜像操作具有破坏性)
  • 触发词:container, registry, docker, image

gitlab-vulnerability (Vulnerabilities - API)

gitlab-vulnerability(安全漏洞 - API)

  • Purpose: Manage security vulnerabilities (Ultimate)
  • Key commands:
    glab api projects/:id/vulnerabilities
  • Risk: ⚠️ (security state changes)
  • Triggers: vulnerability, security, scan, CVE
  • 用途:管理安全漏洞(需Ultimate版本)
  • 核心命令
    glab api projects/:id/vulnerabilities
  • 风险:⚠️(会修改安全状态)
  • 触发词:vulnerability, security, scan, CVE

Connection Verification

连接验证

Before any operation, verify GitLab is configured:
bash
glab auth status
If not authenticated:
bash
glab auth login
Check current repository context:
bash
glab repo view
在执行任何操作前,请验证GitLab配置是否正确:
bash
glab auth status
若未认证,请执行:
bash
glab auth login
查看当前仓库上下文:
bash
glab repo view

Common glab Commands Quick Reference

常用glab命令速查

bash
undefined
bash
undefined

Authentication

认证

glab auth login # Interactive login glab auth status # Check auth status
glab auth login # 交互式登录 glab auth status # 查看认证状态

Merge Requests

合并请求

glab mr list # List MRs glab mr create # Create MR glab mr view <id> # View MR details glab mr checkout <id> # Checkout MR branch glab mr merge <id> # Merge MR
glab mr list # 列出MR glab mr create # 创建MR glab mr view <id> # 查看MR详情 glab mr checkout <id> # 检出MR分支 glab mr merge <id> # 合并MR

Issues

议题

glab issue list # List issues glab issue create # Create issue glab issue view <id> # View issue glab issue close <id> # Close issue
glab issue list # 列出议题 glab issue create # 创建议题 glab issue view <id> # 查看议题 glab issue close <id> # 关闭议题

CI/CD

CI/CD

glab ci status # Current pipeline status glab ci view # Interactive pipeline view glab ci run # Trigger pipeline glab ci artifact # Download artifacts
glab ci status # 当前流水线状态 glab ci view # 交互式查看流水线 glab ci run # 触发流水线 glab ci artifact # 下载制品

Repository

仓库

glab repo clone <path> # Clone repository glab repo fork <path> # Fork repository glab repo view # View repo info
undefined
glab repo clone <path> # 克隆仓库 glab repo fork <path> # 复刻仓库 glab repo view # 查看仓库信息
undefined

Disambiguation

歧义处理

When request is ambiguous, ask for clarification:
Ambiguous RequestClarifying Question
"Show me the status""Do you want CI pipeline status (
glab ci status
) or MR status (
glab mr list
)?"
"Create a new one""What would you like to create? An issue, MR, or repository?"
"List everything""What would you like to list? MRs, issues, pipelines, or repos?"
当请求存在歧义时,请询问用户以澄清:
歧义请求澄清问题
"Show me the status""你需要查看CI流水线状态(
glab ci status
)还是MR状态(
glab mr list
)?"
"Create a new one""你想要创建什么?议题、MR还是仓库?"
"List everything""你想要列出什么?MR、议题、流水线还是仓库?"

Related Documentation

相关文档

  • Decision Tree
  • API Helpers
  • Safeguards
  • Quick Reference
  • 决策树
  • API助手
  • 安全防护
  • 快速参考