gitlab-issue
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitLab Issue Management
GitLab Issue管理
Create, retrieve, update, and manage GitLab issues with comprehensive context integration and structured workflows.
可创建、查询、更新和管理GitLab issue,支持全面的上下文集成和结构化工作流。
GitLab Instance Configuration
GitLab实例配置
This skill is configured for a self-hosted GitLab instance:
- GitLab URL: https://gitlab-erp-pas.dedalus.lan
- All project identifiers, URLs, and references should use this self-hosted instance
- Ensure you have appropriate access credentials configured for this GitLab server
本技能针对自建GitLab实例配置:
- GitLab URL: https://gitlab-erp-pas.dedalus.lan
- 所有项目ID、URL和引用都应使用该自建实例
- 请确保你已为该GitLab服务器配置了合适的访问凭证
When to Use This Skill
何时使用本技能
Activate this skill when:
- The user wants to create a new GitLab issue
- The user asks to view or retrieve issue details
- The user needs to update an existing issue
- The user wants to list issues in a project
- The user mentions managing issues, tickets, or tasks in GitLab
- The user wants to close, reopen, or modify issue properties
- The user needs to link issues to merge requests
在以下场景激活本技能:
- 用户想要创建新的GitLab issue
- 用户要求查看或查询issue详情
- 用户需要更新现有issue
- 用户想要列出项目中的issue
- 用户提及要管理GitLab中的issue、工单或任务
- 用户想要关闭、重新打开或修改issue属性
- 用户需要将issue关联到合并请求
Critical Rules
核心规则
IMPORTANT: Always confirm project_id before creating or modifying issues
Always use descriptive issue titles and provide structured descriptions
Never create duplicate issues - search existing issues first when appropriate
重要提示:创建或修改issue前必须确认project_id
始终使用描述性的issue标题,提供结构化的描述内容
切勿创建重复issue - 必要时先搜索现有issue
Workflow
工作流
1. Gather Context
1. 收集上下文
First, collect information about the current project and context:
- Identify the project (project_id or URL-encoded path)
- Understand the type of issue (bug, feature, task, etc.)
- Gather relevant labels, milestones, and assignees if applicable
首先收集当前项目和相关上下文信息:
- 确认项目(project_id或URL编码路径)
- 明确issue类型(bug、功能需求、任务等)
- 如有适用,收集相关标签、里程碑和处理人信息
2. Project Verification
2. 项目验证
Before any operation, verify the project exists and you have the correct identifier:
Self-hosted GitLab Instance: https://gitlab-erp-pas.dedalus.lan
Use to:
glab repo view- Confirm project exists on the self-hosted GitLab instance
- Get project details (default branch, visibility, etc.)
- Understand project structure
- Verify project path format (e.g., "namespace/project")
任何操作前,验证项目存在且你持有正确的标识符:
自建GitLab实例: https://gitlab-erp-pas.dedalus.lan
使用命令完成以下操作:
glab repo view- 确认项目存在于自建GitLab实例上
- 获取项目详情(默认分支、可见性等)
- 了解项目结构
- 验证项目路径格式(例如"namespace/project")
3. Issue Operations
3. Issue操作
Creating a New Issue
创建新Issue
When creating issues, gather complete context:
Required Information:
- : Project identifier (e.g., "namespace/project" or numeric ID)
project_id - : Clear, descriptive issue title
title
Optional but Recommended:
- : Detailed description in Markdown format
description - : Array of label names (e.g., ["bug", "priority::high"])
labels - : Array of user IDs to assign
assignee_ids - : Milestone ID to associate
milestone_id - : Due date in YYYY-MM-DD format
due_date - : Boolean for sensitive issues
confidential
Human-in-the-Loop - Ask for Context
Always use AskUserQuestion to clarify issue details:
Question: "What type of issue is this?"
Options:
- "Bug report - something is not working correctly"
- "Feature request - new functionality needed"
- "Task - work item to complete"
- "Documentation - documentation needs update"
- "Other - let me describe it"Issue Description Template:
Structure descriptions for clarity:
markdown
undefined创建issue时,收集完整上下文:
必填信息:
- : 项目标识符(例如"namespace/project"或数字ID)
project_id - : 清晰、描述性的issue标题
title
可选但建议提供的信息:
- : Markdown格式的详细描述
description - : 标签名数组(例如["bug", "priority::high"])
labels - : 要分配的用户ID数组
assignee_ids - : 要关联的里程碑ID
milestone_id - : 到期日,格式为YYYY-MM-DD
due_date - : 布尔值,标识是否为敏感issue
confidential
人在回路 - 询问上下文
始终使用AskUserQuestion确认issue细节:
Question: "What type of issue is this?"
Options:
- "Bug report - something is not working correctly"
- "Feature request - new functionality needed"
- "Task - work item to complete"
- "Documentation - documentation needs update"
- "Other - let me describe it"Issue描述模板:
结构化描述以提升可读性:
markdown
undefinedSummary
Summary
[Brief description of the issue]
[Brief description of the issue]
Current Behavior
Current Behavior
[What is happening now - for bugs]
[What is happening now - for bugs]
Expected Behavior
Expected Behavior
[What should happen - for bugs]
[What should happen - for bugs]
Steps to Reproduce
Steps to Reproduce
[For bugs - numbered steps]
[For bugs - numbered steps]
Acceptance Criteria
Acceptance Criteria
[For features/tasks - what defines "done"]
[For features/tasks - what defines "done"]
Additional Context
Additional Context
[Screenshots, logs, related issues, etc.]
undefined[Screenshots, logs, related issues, etc.]
undefinedRetrieving Issue Details
查询Issue详情
Use with:
glab issue view <iid>- : Internal issue ID (the number shown in GitLab, e.g., 42)
<iid>
This returns complete issue information including:
- Title and description
- State (opened/closed)
- Labels and milestone
- Assignees and author
- Created/updated timestamps
- Related merge requests
使用命令,其中:
glab issue view <iid>- : 内部issue ID(GitLab中显示的编号,例如42)
<iid>
该命令会返回完整的issue信息,包括:
- 标题和描述
- 状态(打开/关闭)
- 标签和里程碑
- 处理人和创建人
- 创建/更新时间戳
- 关联的合并请求
Listing Issues
列出Issue
Use with filters:
glab issue list- : "opened", "closed", or "all"
--state - : Filter by labels
--label - : Filter by milestone title
--milestone - : Filter by assignee
--assignee - : Search in title and description
--search - : Sort by "created_at", "updated_at", "priority", etc.
--order-by - : "asc" or "desc"
--sort - : Results per page (max 100)
--per-page
使用带过滤参数的命令:
glab issue list- : "opened"(打开)、"closed"(关闭)或"all"(全部)
--state - : 按标签过滤
--label - : 按里程碑名称过滤
--milestone - : 按处理人过滤
--assignee - : 在标题和描述中搜索
--search - : 排序维度,支持"created_at"(创建时间)、"updated_at"(更新时间)、"priority"(优先级)等
--order-by - : "asc"(升序)或"desc"(降序)
--sort - : 每页结果数(最大100)
--per-page
Updating an Issue
更新Issue
When updating issues, only provide changed fields:
Use with the relevant flags for fields to change (title, description, labels, etc.)
glab issue update <iid>State Changes:
- - Close the issue
glab issue close <iid> - - Reopen the issue
glab issue reopen <iid>
更新issue时,仅提供需要修改的字段:
使用命令,搭配对应要修改字段的参数(标题、描述、标签等)
glab issue update <iid>状态变更:
- - 关闭issue
glab issue close <iid> - - 重新打开issue
glab issue reopen <iid>
4. Linking to Merge Requests
4. 关联合并请求
To find related merge requests:
Use with filters to find MRs that reference the issue:
glab mr list- Search for issue number in MR titles/descriptions
- Check MR descriptions for "Closes #XX" or "Fixes #XX" patterns
查找关联的合并请求:
使用带过滤参数的命令查找引用了该issue的MR:
glab mr list- 在MR标题/描述中搜索issue编号
- 检查MR描述中是否有"Closes #XX"或"Fixes #XX"的格式
5. Execute Operations (Requires Confirmation)
5. 执行操作(需要确认)
CRITICAL: Confirm with user before creating or modifying issues
After gathering all information, present a summary for user approval:
Creating issue in project: namespace/project
Title: [title]
Description: [summary]
Labels: [labels]
Assignee: [assignee]
Proceed with issue creation?关键提示:创建或修改issue前必须获得用户确认
收集完所有信息后,先展示摘要请用户确认:
Creating issue in project: namespace/project
Title: [title]
Description: [summary]
Labels: [labels]
Assignee: [assignee]
Proceed with issue creation?Issue Type Templates
Issue类型模板
Bug Report
Bug报告
markdown
undefinedmarkdown
undefinedBug Description
Bug Description
[Clear description of the bug]
[Clear description of the bug]
Environment
Environment
- Version: [version]
- OS: [operating system]
- Browser: [if applicable]
- Version: [version]
- OS: [operating system]
- Browser: [if applicable]
Steps to Reproduce
Steps to Reproduce
- [First step]
- [Second step]
- [See error]
- [First step]
- [Second step]
- [See error]
Expected Behavior
Expected Behavior
[What should happen]
[What should happen]
Actual Behavior
Actual Behavior
[What actually happens]
[What actually happens]
Screenshots/Logs
Screenshots/Logs
[Attach relevant files]
[Attach relevant files]
Possible Solution
Possible Solution
[Optional: if you have ideas]
undefined[Optional: if you have ideas]
undefinedFeature Request
功能需求
markdown
undefinedmarkdown
undefinedFeature Description
Feature Description
[Clear description of the requested feature]
[Clear description of the requested feature]
Problem Statement
Problem Statement
[What problem does this solve?]
[What problem does this solve?]
Proposed Solution
Proposed Solution
[How should this work?]
[How should this work?]
Alternatives Considered
Alternatives Considered
[Other approaches considered]
[Other approaches considered]
Acceptance Criteria
Acceptance Criteria
- [Criterion 1]
- [Criterion 2]
- [Criterion 3]
- [Criterion 1]
- [Criterion 2]
- [Criterion 3]
Additional Context
Additional Context
[Mockups, examples, etc.]
undefined[Mockups, examples, etc.]
undefinedTask
任务
markdown
undefinedmarkdown
undefinedTask Description
Task Description
[What needs to be done]
[What needs to be done]
Background
Background
[Why is this needed?]
[Why is this needed?]
Requirements
Requirements
- [Requirement 1]
- [Requirement 2]
- [Requirement 1]
- [Requirement 2]
Definition of Done
Definition of Done
- [Criterion 1]
- [Criterion 2]
- [Criterion 1]
- [Criterion 2]
Dependencies
Dependencies
[Related issues, blockers]
undefined[Related issues, blockers]
undefinedExamples
示例
Example 1: Creating a Bug Report
示例1:创建Bug报告
User: "Create an issue for the login bug we discussed"
AI Workflow:
- Ask for project_id if not known
- Ask clarifying questions about the bug
- Generate structured description
- Present summary for confirmation
- Create issue with
glab issue create --title "<title>" --description "<description>" --label "bug,priority::high,auth"
Result:
Title: [BUG] Login fails with OAuth2 when session expires
Description:用户: "Create an issue for the login bug we discussed"
AI工作流:
- 如果不知道project_id则先询问用户
- 询问关于该Bug的细节问题
- 生成结构化描述
- 展示摘要请求确认
- 使用创建issue
glab issue create --title "<title>" --description "<description>" --label "bug,priority::high,auth"
结果:
Title: [BUG] Login fails with OAuth2 when session expires
Description:Bug Description
Bug Description
Users are unable to log in using OAuth2 authentication when their
previous session has expired.
Users are unable to log in using OAuth2 authentication when their
previous session has expired.
Steps to Reproduce
Steps to Reproduce
- Log in with OAuth2 (Google/GitHub)
- Wait for session to expire (or clear cookies)
- Attempt to log in again
- Observe error: "Invalid state parameter"
- Log in with OAuth2 (Google/GitHub)
- Wait for session to expire (or clear cookies)
- Attempt to log in again
- Observe error: "Invalid state parameter"
Expected Behavior
Expected Behavior
User should be redirected to OAuth provider and log in successfully.
User should be redirected to OAuth provider and log in successfully.
Actual Behavior
Actual Behavior
Login fails with "Invalid state parameter" error.
Login fails with "Invalid state parameter" error.
Environment
Environment
- Version: 2.3.1
- Browser: Chrome 120, Firefox 121
Labels: ["bug", "priority::high", "auth"]
undefined- Version: 2.3.1
- Browser: Chrome 120, Firefox 121
Labels: ["bug", "priority::high", "auth"]
undefinedExample 2: Listing and Filtering Issues
示例2:列出并过滤Issue
User: "Show me all open bugs assigned to me"
AI Workflow:
- Use to list matching issues
glab issue list --state opened --label bug --assignee @me
Result:
Found 3 open bug issues assigned to you:
#142 - [BUG] API timeout on large file uploads
Labels: bug, priority::medium
Created: 2024-01-15
#138 - [BUG] Dashboard graphs not rendering on Safari
Labels: bug, frontend, priority::low
Created: 2024-01-12
#125 - [BUG] Email notifications delayed by 30+ minutes
Labels: bug, priority::high
Created: 2024-01-08用户: "Show me all open bugs assigned to me"
AI工作流:
- 使用列出匹配的issue
glab issue list --state opened --label bug --assignee @me
结果:
Found 3 open bug issues assigned to you:
#142 - [BUG] API timeout on large file uploads
Labels: bug, priority::medium
Created: 2024-01-15
#138 - [BUG] Dashboard graphs not rendering on Safari
Labels: bug, frontend, priority::low
Created: 2024-01-12
#125 - [BUG] Email notifications delayed by 30+ minutes
Labels: bug, priority::high
Created: 2024-01-08Example 3: Updating an Issue
示例3:更新Issue
User: "Close issue #142 and add a comment that it's fixed in v2.4.0"
AI Workflow:
- First, add a note/comment to the issue:
glab issue note 142 --message "Fixed in v2.4.0. Closing this issue." - Then close the issue:
glab issue close 142
Result:
Issue #142 "[BUG] API timeout on large file uploads" has been closed.用户: "Close issue #142 and add a comment that it's fixed in v2.4.0"
AI工作流:
- 首先给issue添加备注:
glab issue note 142 --message "Fixed in v2.4.0. Closing this issue." - 然后关闭issue:
glab issue close 142
结果:
Issue #142 "[BUG] API timeout on large file uploads" has been closed.Example 4: Feature Request with Full Context
示例4:完整上下文的功能需求
User: "Create a feature request for adding dark mode support"
AI Workflow:
- Ask clarifying questions about the feature
- Gather acceptance criteria
- Create structured issue
Result:
Title: [FEATURE] Add dark mode theme support
Description:用户: "Create a feature request for adding dark mode support"
AI工作流:
- 询问该功能的细节问题
- 收集验收标准
- 创建结构化issue
结果:
Title: [FEATURE] Add dark mode theme support
Description:Feature Description
Feature Description
Implement a dark mode theme option that users can toggle in their
preferences.
Implement a dark mode theme option that users can toggle in their
preferences.
Problem Statement
Problem Statement
Users working in low-light environments experience eye strain with
the current bright interface. Dark mode would improve accessibility
and user comfort.
Users working in low-light environments experience eye strain with
the current bright interface. Dark mode would improve accessibility
and user comfort.
Proposed Solution
Proposed Solution
- Add theme toggle in user preferences
- Implement CSS variables for theme colors
- Store preference in user settings
- Support system preference detection
- Add theme toggle in user preferences
- Implement CSS variables for theme colors
- Store preference in user settings
- Support system preference detection
Acceptance Criteria
Acceptance Criteria
- User can toggle between light/dark mode in settings
- Theme preference persists across sessions
- System preference is detected on first visit
- All UI components support both themes
- No accessibility contrast issues in dark mode
- User can toggle between light/dark mode in settings
- Theme preference persists across sessions
- System preference is detected on first visit
- All UI components support both themes
- No accessibility contrast issues in dark mode
Additional Context
Additional Context
Reference designs: [link to mockups]
Similar implementations: GitHub, GitLab, VS Code
Labels: ["feature", "enhancement", "ux"]
undefinedReference designs: [link to mockups]
Similar implementations: GitHub, GitLab, VS Code
Labels: ["feature", "enhancement", "ux"]
undefinedImportant Notes
重要提示
- Self-hosted GitLab: All operations use https://gitlab-erp-pas.dedalus.lan
- Always verify project access - Ensure you have permission to create/modify issues on the self-hosted instance
- Use labels consistently - Follow project labeling conventions
- Be specific in titles - Prefix with [BUG], [FEATURE], [TASK] for clarity
- Include reproduction steps - Essential for bug reports
- Define acceptance criteria - Clear "definition of done" for features/tasks
- Link related issues - Use "Related to #XX" or "Blocks #XX" in descriptions
- Mention users with @username - For visibility and notifications
- Use milestones - Associate issues with releases or sprints when applicable
- 自建GitLab: 所有操作都使用https://gitlab-erp-pas.dedalus.lan
- 始终验证项目访问权限 - 确保你有权限在该自建实例上创建/修改issue
- 保持标签使用一致性 - 遵循项目的标签规范
- 标题要明确 - 前缀添加[BUG]、[FEATURE]、[TASK]提升可读性
- 包含复现步骤 - 这对Bug报告至关重要
- 定义验收标准 - 为功能/任务明确“完成定义”
- 关联相关issue - 在描述中使用“Related to #XX”或“Blocks #XX”标注
- 使用@用户名提及用户 - 提升可见性并触发通知
- 使用里程碑 - 必要时将issue关联到版本或迭代
GitLab Issue Best Practices
GitLab Issue最佳实践
Writing Effective Titles
编写高效标题
- Be concise but descriptive
- Include issue type prefix: [BUG], [FEATURE], [TASK], [DOCS]
- Mention affected component if applicable
- Avoid vague titles like "Fix bug" or "Update code"
- 简洁但具备描述性
- 包含issue类型前缀:[BUG]、[FEATURE]、[TASK]、[DOCS]
- 如有适用,提及受影响的组件
- 避免模糊的标题,比如“修复Bug”或“更新代码”
Structuring Descriptions
结构化描述
- Use Markdown formatting for readability
- Include all relevant context upfront
- Add screenshots or logs when helpful
- Link to related issues, MRs, or documentation
- Use task lists for trackable sub-items
- 使用Markdown格式提升可读性
- 开头就包含所有相关上下文
- 必要时添加截图或日志
- 关联相关issue、MR或文档
- 使用任务列表跟踪子项
Label Strategy
标签策略
- Use scoped labels (e.g., ,
priority::high)status::in-progress - Combine type labels (,
bug) with area labels (feature,frontend)api - Keep label taxonomy consistent across projects
- 使用范围标签(例如、
priority::high)status::in-progress - 结合类型标签(、
bug)和领域标签(feature、frontend)api - 跨项目保持标签分类体系一致
Assignment and Workflow
分配和工作流
- Assign issues to specific team members
- Use milestones for sprint/release planning
- Update issue status as work progresses
- Close issues with reference to fixing MR: "Closes #XX"
- 将issue分配给具体的团队成员
- 使用里程碑做迭代/版本规划
- 工作推进时更新issue状态
- 关闭issue时引用修复的MR:"Closes #XX"