跳转到内容

GitLab Issue 跟踪

这个仓库的 issue 和规格都放在 GitLab issue 中。所有操作都使用 glab CLI。

  • 创建 issue:glab issue create --title "..." --description "..."。多行描述请使用 heredoc。传入 --description - 可打开编辑器。
  • 读取 issue:glab issue view <number> --comments。使用 -F json 获取机器可读的输出。
  • 列出 issue:使用适当的 --label 筛选条件运行 glab issue list -O json。
  • 评论 issue:glab issue note <number> --message "..."。GitLab 将评论称为「notes」。
  • 添加或移除标签:glab issue update <number> --label "..." / --unlabel "..."。多个标签可以用逗号分隔,也可以重复传入标记。
  • 关闭:glab issue close <number>。glab issue close 不接受关闭评论,因此请先用 glab issue note <number> --message "..." 发布说明,再关闭 issue。
  • 合并请求:GitLab 将 PR 称为「merge requests」。使用 glab mr create、glab mr view、glab mr note 等命令,格式与 gh pr ... 相同,只需将 pr 换成 mr,将 comment / --body 换成 note / --message。

通过 git remote -v 推断仓库。glab 在克隆仓库中运行时会自动完成这一步。

将 MR 作为需求入口:否。 (如果这个仓库将外部合并请求视为功能需求,请设为 yes;/triage 会读取此标记。)

设为 yes 后,MR 会使用与 issue 相同的标签和状态处理,并使用对应的 glab mr 命令:

  • 读取 MR:运行 glab mr view <number> --comments,并用 glab mr diff <number> 查看 diff。
  • 列出待分流的外部 MR:运行 glab mr list -O json,然后只保留作者不是项目成员或所有者的 MR(即贡献者提交的 MR,而非维护者正在处理的工作)。
  • 评论、添加标签或关闭:使用 glab mr note、glab mr update --label / --unlabel、glab mr close。

与 GitHub 不同,GitLab 对 issue 和 MR 分别编号。因此,只要知道维护者指的是哪个入口,#42 就不会产生歧义。

当 skill 说「发布到 issue 跟踪系统」

Section titled “当 skill 说「发布到 issue 跟踪系统」”

创建一个 GitLab issue。

运行 glab issue view <number> --comments。

由 /wayfinder 使用。地图是一个 issue,子项是工单。

  • 地图:一个标记为 wayfinder:map 的 issue,正文包含 Notes / Decisions-so-far / Fog。运行 glab issue create --label wayfinder:map 创建。(在提供原生 epic 功能的 GitLab 套餐中,也可以用 epic 保存地图;带标签的 issue 则适用于所有套餐。)
  • 子工单:一个 issue,描述开头写有 Part of #<map>,并链接到地图(glab issue create --linked-issues <map> --link-type relates_to),同时带有 wayfinder:<type> 标签(research / prototype / grilling / task)。认领后,将工单分配给负责推进的开发者。
  • 阻塞关系:使用 GitLab 的原生阻塞链接,这是规范且在界面中可见的表示方式。通过 /blocked_by #<n> 快捷操作添加,作为 note 发布(glab issue note <child> --message "/blocked_by #<blocker>")。原生阻塞链接是 Premium / Ultimate 功能;免费套餐或无法使用时,在描述开头添加 Blocked by: #<n>, #<n> 作为替代。所有阻塞项都关闭后,工单才解除阻塞。
  • 前沿查询:运行 glab api projects/:id/issues/<map>/links 列出地图的子项,只保留带有 wayfinder:<type> 标签的未关闭 issue;排除存在未关闭阻塞项或已受派人的工单。阻塞项可以是指向未关闭 issue 的原生 blocked_by 链接(glab api projects/:id/issues/<child-iid>/links),也可以是 Blocked by 行中的未关闭 issue。按地图顺序选择第一个。
  • 认领:glab issue update <n> --assignee @me,这是会话中的首次写入操作。
  • 解决:运行 glab issue note <n> --message "<answer>",然后运行 glab issue close <n>,最后将上下文指针(gist + 链接)追加到地图的 Decisions-so-far 中。
英文 issue-tracker-gitlab.md
# Issue tracker: GitLab
Issues and specs for this repo live as GitLab issues. Use the [`glab`](https://gitlab.com/gitlab-org/cli) CLI for all operations.
## Conventions
- **Create an issue**: `glab issue create --title "..." --description "..."`. Use a heredoc for multi-line descriptions. Pass `--description -` to open an editor.
- **Read an issue**: `glab issue view <number> --comments`. Use `-F json` for machine-readable output.
- **List issues**: `glab issue list -F json` with appropriate `--label` filters.
- **Comment on an issue**: `glab issue note <number> --message "..."`. GitLab calls comments "notes".
- **Apply / remove labels**: `glab issue update <number> --label "..."` / `--unlabel "..."`. Multiple labels can be comma-separated or by repeating the flag.
- **Close**: `glab issue close <number>`. `glab issue close` does not accept a closing comment, so post the explanation first with `glab issue note <number> --message "..."`, then close.
- **Merge requests**: GitLab calls PRs "merge requests". Use `glab mr create`, `glab mr view`, `glab mr note`, etc., the same shape as `gh pr ...` with `mr` in place of `pr` and `note`/`--message` in place of `comment`/`--body`.
Infer the repo from `git remote -v`; `glab` does this automatically when run inside a clone.
## Merge requests as a triage surface
**MRs as a request surface: no.** _(Set to `yes` if this repo treats external merge requests as feature requests; `/triage` reads this flag.)_
When set to `yes`, MRs run through the same labels and states as issues, using the `glab mr` equivalents:
- **Read an MR**: `glab mr view <number> --comments` and `glab mr diff <number>` for the diff.
- **List external MRs for triage**: `glab mr list -F json`, then keep only MRs whose author is not a project member/owner (a contributor's MR, not a maintainer's in-flight work).
- **Comment / label / close**: `glab mr note`, `glab mr update --label`/`--unlabel`, `glab mr close`.
Unlike GitHub, GitLab numbers issues and MRs separately, so `#42` is unambiguous once you know which surface the maintainer means.
## When a skill says "publish to the issue tracker"
Create a GitLab issue.
## When a skill says "fetch the relevant ticket"
Run `glab issue view <number> --comments`.
## Wayfinding operations
Used by `/wayfinder`. The **map** is a single issue with **child** issues as tickets.
- **Map**: a single issue labelled `wayfinder:map`, holding the Notes / Decisions-so-far / Fog body. `glab issue create --label wayfinder:map`. (On GitLab tiers with native epics, an epic may hold the map instead; a labelled issue works everywhere.)
- **Child ticket**: an issue carrying `Part of #<map>` at the top of its description and labels `wayfinder:<type>` (`research`/`prototype`/`grilling`/`task`). Once claimed, the ticket is assigned to the driving dev.
- **Blocking**: GitLab's **native blocking link**, the canonical, UI-visible representation. Add it with the `/blocked_by #<n>` quick action, posted as a note (`glab issue note <child> --message "/blocked_by #<blocker>"`). Native blocking links are a Premium/Ultimate feature; on the free tier (or where unavailable) fall back to a `Blocked by: #<n>, #<n>` line at the top of the description. A ticket is unblocked when every blocker is closed.
- **Frontier query**: `glab issue list -F json` scoped to the map's children, drop any with an open blocker: a native `blocked_by` link to an open issue (`glab api projects/:id/issues/:iid/links`), or an open issue in the `Blocked by` line, or an assignee; first in map order wins.
- **Claim**: `glab issue update <n> --assignee @me`, the session's first write.
- **Resolve**: `glab issue note <n> --message "<answer>"`, then `glab issue close <n>`, then append a context pointer (gist + link) to the map's Decisions-so-far.

非官方学习站,与 Matt Pocock 和 AI Hero 没有隶属关系。本站不提供可安装的中文技能包。

技能原文采用 MIT 许可。Copyright (c) 2026 Matt Pocock

鲁ICP备2025189036号