---
# L2 / SEE assignment: maps an issue's (first) component to one of the three SEE
# teams. The `custom` command then asks the oncall service for that team's
# current on-call and writes it into the SEE custom field (customfield_10053).
# Night shift / no-one-on-call / one-person-covers-two-teams is handled natively
# by the oncall schedule.
#
# Components not listed here yield no SEE team -> "fail to find L2 assignee".
#
# The component -> team split is copied 1:1 from the decommissioned policy DB
# `categories.components` (day-shift categories 49 / 50 / 52 = compute / storage
# / tools). L2 issues are human-filed tickets, not next-gen alerts, so the
# human-facing Jira component names appear here.
extractors:
  component: "{{ with .Fields.Components }}{{ (index . 0).Name }}{{ end }}"
routes:
  # support_compute  <- legacy category 49
  - receiver: support_compute
    match:
      component: ^(TiDB|TiDB Compute|DDL|Performance Tuning|TiFlash|TiDB Optimizer|TiDB SQL|TiSpark)$
  # support_storage  <- legacy category 50
  - receiver: support_storage
    match:
      component: ^(TiKV|PD|TiDB Transaction|DR-autosync)$
  # support_tools    <- legacy category 52
  - receiver: support_tools
    match:
      component: ^(TiDB Lightning|Cloud Import|TiKV BR|TiKV CDC|BR|Cloud DM|Dumpling|sync-diff-inspector|TiCDC|TiDB Binlog|DM|Import/Export|Backup/Restore|Data Migration)$
