labels

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Labels

标签

List

列出

bash
tea labels list -o simple          # all labels, compact output (recommended)
tea labels list --output json      # use json only when parsing with jq
tea labels list --save             # export to file (tea internal format)
bash
tea labels list -o simple          # all labels, compact output (recommended)
tea labels list --output json      # use json only when parsing with jq
tea labels list --save             # export to file (tea internal format)

Create

创建

bash
tea labels create --name "bug" --color "#d73a4a"
tea labels create --name "enhancement" --color "#a2eeef" --description "New feature or request"
tea labels create --file labels.csv   # bulk import from file
bash
tea labels create --name "bug" --color "#d73a4a"
tea labels create --name "enhancement" --color "#a2eeef" --description "New feature or request"
tea labels create --file labels.csv   # bulk import from file

Update

更新

bash
undefined
bash
undefined

Get label ID (requires json for parsing)

Get label ID (requires json for parsing)

tea labels list --output json | jq '.[] | {id, name, color}'
tea labels update --id 5 --name "bugfix" --color "#d73a4a" tea labels update --id 5 --description "Updated description"
undefined
tea labels list --output json | jq '.[] | {id, name, color}'
tea labels update --id 5 --name "bugfix" --color "#d73a4a" tea labels update --id 5 --description "Updated description"
undefined

Delete

删除

bash
tea labels delete 5
bash
tea labels delete 5

Apply to Issues

应用到Issue

bash
tea issues create --title "Fix login" --labels "type:bug,priority:high"
tea issues edit 42 --add-labels "status:in-progress"
tea issues edit 42 --remove-labels "status:needs-triage"
bash
tea issues create --title "Fix login" --labels "type:bug,priority:high"
tea issues edit 42 --add-labels "status:in-progress"
tea issues edit 42 --remove-labels "status:needs-triage"

Tips

提示

  • Labels identified by name in
    tea issues
    , by ID in
    tea labels update/delete
  • Colors need
    #
    prefix (e.g.,
    #d73a4a
    )
  • Names are case-sensitive
  • Deleting a label removes it from all issues/PRs
  • 在
    tea issues
    命令中通过名称识别标签,在
    tea labels update/delete
    命令中通过ID识别标签
  • 颜色值需要带
    #
    前缀(例如
    #d73a4a
    )
  • 标签名称区分大小写
  • 删除标签会将其从所有issue/PR中移除