gitlab-issue
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseIssue Skill
Issue 操作技能
Issue operations for GitLab using the CLI.
glab使用 CLI进行GitLab Issue操作。
glabQuick Reference
快速参考
| Operation | Command | Risk |
|---|---|---|
| List issues | | - |
| View issue | | - |
| Create issue | | ⚠️ |
| Update issue | | ⚠️ |
| Close issue | | ⚠️ |
| Reopen issue | | ⚠️ |
| Delete issue | | ⚠️⚠️ |
| Add note | | ⚠️ |
Risk Legend: - Safe | ⚠️ Caution | ⚠️⚠️ Warning | ⚠️⚠️⚠️ Danger
| 操作 | 命令 | 风险等级 |
|---|---|---|
| 列出Issue | | - |
| 查看Issue | | - |
| 创建Issue | | ⚠️ |
| 更新Issue | | ⚠️ |
| 关闭Issue | | ⚠️ |
| 重新打开Issue | | ⚠️ |
| 删除Issue | | ⚠️⚠️ |
| 添加备注 | | ⚠️ |
风险等级说明:- 安全 | ⚠️ 注意 | ⚠️⚠️ 警告 | ⚠️⚠️⚠️ 危险
When to Use This Skill
何时使用本技能
ALWAYS use when:
- User wants to work with issues
- User mentions "issue", "bug", "task", "ticket" or related terms
- User wants to track or manage work items
NEVER use when:
- User wants bulk operations on 10+ issues (use gitlab-bulk instead)
- User is only searching/filtering issues (use gitlab-search instead)
请务必使用本技能的场景:
- 用户需要处理Issue
- 用户提及“Issue”、“Bug”、“任务”、“工单”或相关术语
- 用户需要跟踪或管理工作项
请勿使用本技能的场景:
- 用户需要对10个以上的Issue进行批量操作(请使用gitlab-bulk技能)
- 用户仅需搜索/筛选Issue(请使用gitlab-search技能)
Available Commands
可用命令
List Issues
列出Issue
bash
glab issue list [options]Options:
| Flag | Description |
|---|---|
| Filter by assignee (use @me for yourself) |
| Filter by author |
| Filter by comma-separated labels |
| Filter by milestone |
| Filter by state: opened, closed, all (default: opened) |
| Get only closed issues |
| Get all issues |
| Number of items per page |
| Filter to only confidential issues |
| Search issues by title/description |
Examples:
bash
undefinedbash
glab issue list [options]选项:
| 标识 | 说明 |
|---|---|
| 按经办人筛选(使用@me指代自己) |
| 按创建人筛选 |
| 按逗号分隔的标签筛选 |
| 按里程碑筛选 |
| 按状态筛选:opened(已打开)、closed(已关闭)、all(全部)(默认:opened) |
| 仅查看已关闭的Issue |
| 查看所有Issue |
| 每页显示的条目数 |
| 仅查看保密Issue |
| 按标题/描述搜索Issue |
示例:
bash
undefinedList all open issues
列出所有已打开的Issue
glab issue list
glab issue list
List issues assigned to you
列出分配给自己的Issue
glab issue list --assignee=@me
glab issue list --assignee=@me
List closed issues
列出已关闭的Issue
glab issue list --closed
glab issue list --closed
List issues with specific label
列出带有特定标签的Issue
glab issue list --label=bug
glab issue list --label=bug
List issues in a milestone
列出指定里程碑中的Issue
glab issue list --milestone="Release 1.0"
glab issue list --milestone="Release 1.0"
Search issues
搜索Issue
glab issue list --search="login bug"
glab issue list --search="login bug"
Get all issues (paginated)
查看所有Issue(分页)
glab issue list --all
undefinedglab issue list --all
undefinedView Issue Details
查看Issue详情
bash
glab issue view <id> [options]Options:
| Flag | Description |
|---|---|
| Open issue in browser |
| Show issue comments |
| Show system activities |
Examples:
bash
undefinedbash
glab issue view <id> [options]选项:
| 标识 | 说明 |
|---|---|
| 在浏览器中打开Issue |
| 显示Issue评论 |
| 显示系统活动日志 |
示例:
bash
undefinedView issue in terminal
在终端中查看Issue详情
glab issue view 42
glab issue view 42
Open issue in browser
在浏览器中打开Issue
glab issue view 42 --web
glab issue view 42 --web
View with comments
查看Issue及评论
glab issue view 42 --comments
undefinedglab issue view 42 --comments
undefinedCreate Issue
创建Issue
bash
glab issue create [options]Options:
| Flag | Description |
|---|---|
| Issue title |
| Issue description |
| Comma-separated assignees |
| Comma-separated labels |
| Milestone title |
| Create as confidential |
| Issue weight (0-9) |
| Open in browser after creation |
| Skip confirmation prompts |
Examples:
bash
undefinedbash
glab issue create [options]选项:
| 标识 | 说明 |
|---|---|
| Issue标题 |
| Issue描述 |
| 逗号分隔的经办人列表 |
| 逗号分隔的标签列表 |
| 里程碑标题 |
| 创建为保密Issue |
| Issue权重(0-9) |
| 创建后在浏览器中打开 |
| 跳过确认提示 |
示例:
bash
undefinedCreate issue with title
创建带标题的Issue
glab issue create -t "Fix login bug"
glab issue create -t "Fix login bug"
Create issue with full details
创建包含完整信息的Issue
glab issue create -t "Add dark mode" -d "Implement dark mode toggle" -l "enhancement,ui"
glab issue create -t "Add dark mode" -d "Implement dark mode toggle" -l "enhancement,ui"
Create issue with milestone and assignee
创建指定里程碑和经办人的Issue
glab issue create -t "Release prep" -m "Release 2.0" -a "@me"
glab issue create -t "Release prep" -m "Release 2.0" -a "@me"
Create confidential issue
创建保密Issue
glab issue create -t "Security vulnerability" --confidential
glab issue create -t "Security vulnerability" --confidential
Create and open in browser
创建并在浏览器中打开
glab issue create -t "New feature" --web
undefinedglab issue create -t "New feature" --web
undefinedUpdate Issue
更新Issue
bash
glab issue update <id> [options]Options:
| Flag | Description |
|---|---|
| Update title |
| Update description |
| Update assignees |
| Remove all assignees |
| Add labels |
| Remove labels |
| Set milestone |
| Mark as confidential |
| Mark as public |
| Lock discussion |
| Unlock discussion |
Examples:
bash
undefinedbash
glab issue update <id> [options]选项:
| 标识 | 说明 |
|---|---|
| 更新标题 |
| 更新描述 |
| 更新经办人 |
| 移除所有经办人 |
| 添加标签 |
| 移除标签 |
| 设置里程碑 |
| 标记为保密Issue |
| 标记为公开Issue |
| 锁定讨论 |
| 解锁讨论 |
示例:
bash
undefinedUpdate title
更新标题
glab issue update 42 -t "Updated title"
glab issue update 42 -t "Updated title"
Add labels
添加标签
glab issue update 42 -l "priority,reviewed"
glab issue update 42 -l "priority,reviewed"
Remove labels
移除标签
glab issue update 42 --unlabel="needs-review"
glab issue update 42 --unlabel="needs-review"
Change assignee
更换经办人
glab issue update 42 -a "username"
glab issue update 42 -a "username"
Add to milestone
添加到指定里程碑
glab issue update 42 -m "Sprint 5"
undefinedglab issue update 42 -m "Sprint 5"
undefinedClose/Reopen Issue
关闭/重新打开Issue
bash
undefinedbash
undefinedClose issue
关闭Issue
glab issue close <id>
glab issue close <id>
Reopen issue
重新打开Issue
glab issue reopen <id>
undefinedglab issue reopen <id>
undefinedDelete Issue
删除Issue
bash
glab issue delete <id>Warning: This permanently deletes the issue. Use with caution.
bash
glab issue delete <id>警告:此操作会永久删除Issue,请谨慎使用。
Add Note/Comment
添加备注/评论
bash
glab issue note <id> -m "<message>"Examples:
bash
undefinedbash
glab issue note <id> -m "<message>"示例:
bash
undefinedAdd comment
添加评论
glab issue note 42 -m "Working on this now"
glab issue note 42 -m "Working on this now"
Add closing comment
添加关闭评论
glab issue note 42 -m "Fixed in !123"
undefinedglab issue note 42 -m "Fixed in !123"
undefinedSubscribe/Unsubscribe
订阅/取消订阅
bash
undefinedbash
undefinedSubscribe to issue notifications
订阅Issue通知
glab issue subscribe <id>
glab issue subscribe <id>
Unsubscribe
取消订阅
glab issue unsubscribe <id>
undefinedglab issue unsubscribe <id>
undefinedCommon Workflows
常见工作流
Workflow 1: Triage Issues
工作流1:Issue分类处理
bash
undefinedbash
undefined1. List unassigned issues
1. 列出未分配的Issue
glab issue list --assignee=""
glab issue list --assignee=""
2. View issue details
2. 查看Issue详情
glab issue view 42
glab issue view 42
3. Assign and label
3. 分配经办人并添加标签
glab issue update 42 -a "developer" -l "bug,priority"
undefinedglab issue update 42 -a "developer" -l "bug,priority"
undefinedWorkflow 2: Work on Issue
工作流2:处理Issue
bash
undefinedbash
undefined1. Find assigned issues
1. 查找分配给自己的Issue
glab issue list --assignee=@me
glab issue list --assignee=@me
2. View details
2. 查看详情
glab issue view 42
glab issue view 42
3. Create branch and work
3. 创建分支并开始工作
git checkout -b fix/issue-42
git checkout -b fix/issue-42
4. Add progress note
4. 添加进度备注
glab issue note 42 -m "Started work on this"
glab issue note 42 -m "Started work on this"
5. Close when MR is merged
5. 合并MR后关闭Issue
glab issue close 42
undefinedglab issue close 42
undefinedWorkflow 3: Quick Bug Report
工作流3:快速提交Bug报告
bash
undefinedbash
undefinedCreate issue with all details
创建包含完整信息的Issue
glab issue create
-t "Login fails with special characters"
-d "Steps to reproduce:
-t "Login fails with special characters"
-d "Steps to reproduce:
- Enter username with @ symbol
- Click login
- Error: 500
Expected: Login succeeds"
-l "bug,login"
-l "bug,login"
undefinedglab issue create
-t "Login fails with special characters"
-d "Steps to reproduce:
-t "Login fails with special characters"
-d "Steps to reproduce:
- Enter username with @ symbol
- Click login
- Error: 500
Expected: Login succeeds"
-l "bug,login"
-l "bug,login"
undefinedTroubleshooting
故障排查
| Issue | Cause | Solution |
|---|---|---|
| Authentication failed | Invalid/expired token | Run |
| Issue not found | Invalid ID or no access | Verify ID with |
| Permission denied | Insufficient rights | Check project permissions |
| Cannot close | Issue is locked | Request unlock from maintainer |
| 问题现象 | 原因 | 解决方法 |
|---|---|---|
| 认证失败 | 令牌无效/过期 | 执行 |
| 未找到Issue | ID无效或无访问权限 | 使用 |
| 权限不足 | 权限不够 | 检查项目权限设置 |
| 无法关闭Issue | Issue已被锁定 | 联系维护者解锁 |
Related Documentation
相关文档
- Safeguards
- Quick Reference
- 安全防护措施
- 快速参考手册