issue-tracker-gitlab

setup-matt-pocock-skills · 附屬文件

Issue tracker: GitLab

Issue 追蹤器:GitLab

Issues and specs for this repo live as GitLab issues. Use the glab CLI for all operations.

這個 repo 的 issue 與規格以 GitLab issue 的形式存在。所有操作使用 glab CLI。

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.
  • 建立 issueglab issue create --title "..." --description "..."。多行 description 使用 heredoc。傳 --description - 開啟編輯器。
  • 讀取 issueglab issue view <number> --comments。用 -F json 取得機器可讀的輸出。
  • 列出 issueglab issue list -F json,搭配適當的 --label 過濾。
  • 在 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 "..." 發表說明,再關閉。
  • Merge request:GitLab 稱 PR 為 "merge request"。用 glab mr createglab mr viewglab mr note 等——形狀與 gh pr ... 相同,只是用 mr 代替 pr、用 note/--message 代替 comment/--body

Infer the repo from git remote -v; glab does this automatically when run inside a clone.

git remote -v 推斷 repo——glab 在 clone 內執行時會自動做到。

Merge requests as a triage surface

Merge request 作為分診表面

MRs as a request surface: no. (Set to yes if this repo treats external merge requests as feature requests; /triage reads this flag.)

MR 作為請求表面:否。 (如果這個 repo 把外部 merge request 當成功能請求,設為 yes/triage 會讀這個旗標。)

When set to yes, MRs run through the same labels and states as issues, using the glab mr equivalents:

設為 yes 時,MR 與 issue 跑同一套標籤與狀態,使用 glab mr 的對應指令:

  • 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.
  • 讀取 MRglab mr view <number> --comments,diff 用 glab mr diff <number>
  • 列出待分診的外部 MRglab mr list -F json,然後只保留作者不是專案成員/擁有者的 MR(貢獻者的 MR,不是維護者進行中的工作)。
  • 留言 / 標籤 / 關閉glab mr noteglab mr update --label/--unlabelglab mr close

Unlike GitHub, GitLab numbers issues and MRs separately, so #42 is unambiguous once you know which surface the maintainer means.

不像 GitHub,GitLab 分開編號 issue 與 MR,所以一旦你知道維護者指的是哪個表面,#42 就沒有歧義。

When a skill says "publish to the issue tracker"

當技能說「publish to the issue tracker」

Create a GitLab issue.

建立一個 GitLab issue。

When a skill says "fetch the relevant ticket"

當技能說「fetch the relevant ticket」

Run glab issue view <number> --comments.

執行 glab issue view <number> --comments

Wayfinding operations

尋路操作

Used by /wayfinder. The map is a single issue with child issues as tickets.

/wayfinder 使用。地圖是單一 issue, issue 是 ticket。

  • 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.
  • 地圖:單一帶 wayfinder:map 標籤的 issue,容納 Notes / Decisions-so-far / Fog 的內容。glab issue create --label wayfinder:map。(在原生支援 epic 的 GitLab 層級,epic 可以容納地圖;有標籤的 issue 在任何地方都能用。)
  • 子 ticket:description 頂端帶 Part of #<map>、標籤為 wayfinder:<type>research/prototype/grilling/task)的 issue。一旦被認領,ticket 指派給執行的開發者。
  • 阻塞:GitLab 的原生阻塞連結——標準、UI 可見的表示。用 /blocked_by #<n> 快速動作加入,以 note 發佈(glab issue note <child> --message "/blocked_by #<blocker>")。原生阻塞連結是 Premium/Ultimate 功能;在免費層(或不可用時)回退到 description 頂端的 Blocked by: #<n>, #<n> 一行。當每個阻塞者都關閉時,ticket 就未阻塞。
  • 前沿查詢glab issue list -F json 限定在地圖的子項,丟掉任何有開啟阻塞者的——指向開啟 issue 的原生 blocked_by 連結(glab api projects/:id/issues/:iid/links),或 Blocked by 行中的開啟 issue——或已有指派者的;地圖順序第一個勝出。
  • 認領glab issue update <n> --assignee @me——這個 session 的第一次寫入。
  • 解決glab issue note <n> --message "<answer>",然後 glab issue close <n>,然後在地圖的 Decisions-so-far 附加一個上下文指標(gist + 連結)。