Summary

GitLab Marketing team’s label strategy, covering hierarchy (project vs. group labels), scoped labels for mutually exclusive states, naming conventions, and lifecycle management (deprecate before delete). Core principle: create labels at the lowest possible level to minimize clutter.

GitLab 標籤系統設計原則:盡量在最低層級創建、使用 Scoped Labels 實現互斥狀態、標籤名稱限制 25 字元以避免 UI 截斷、刪除前需先廢棄一個月。

Key Points

  • Project labels: scoped to one project only. Group labels: cascade to all subgroups and projects — use sparingly
  • Scoped Labels (e.g., status::active, status::blocked) are mutually exclusive: applying one removes the previous label in the set automatically
  • Label names should be under 25 characters to avoid UI truncation
  • Each label’s Description field should specify: when to apply, purpose/goal, and DRI
  • Group like labels with a common prefix (e.g., Sales_Region_West, Sales_Region_East) for UI grouping
  • Deprecation process: append DEPRECATE_ prefix → socialize → wait one calendar month → delete. Never delete directly (breaks historical associations)
  • Use Triage Bot to automate label hygiene at scale

Insights

  • The “deprecate before delete” rule exists because deleting a label removes all historical associations on past issues — a destructive side effect that’s easy to miss. This is a sharp edge in GitLab’s data model.
  • Scoped labels are the recommended mechanism for workflow state machines (status, priority tiers) — they enforce single-value semantics without application-level validation.

Connections

Raw Excerpt

“Scoped Labels are used to assign status, support workflows, or otherwise segment items into ‘either / or’ situations. When one Scoped Label is applied, it automatically replaces any previous Label in that set.”