跳转到内容

cnb-rs user emails

cnb-rs user emails

列出当前用户的所有邮箱(含 git 提交邮箱 / 联系邮箱 / 系统邮箱 / 全部邮箱列表)。

选项

无位置参数 / flag。

继承的全局选项:

  • --json: 输出原始 UserEmails 结构

字段含义

字段含义
Git Emailgit commit 时用的作者邮箱(必须是 emails 列表中的某一个)
Contact联系邮箱(接收 CNB 平台通知)
System系统默认邮箱(OAuth 注册时分配的 noreply.cnb.cool 邮箱)
System 通知系统默认邮箱是否接收通知(✓ 开 / ✗ 关)
所有邮箱已绑定到账户的全部邮箱(含未验证)

输出示例

  Git Email      alice@example.com
  Contact        alice-contact@example.com
  System         NSC0Tb...+alice_cnb.xyz@noreply.cnb.cool
  System 通知

  所有邮箱(3):
    - NSC0Tb...+alice_cnb.xyz@noreply.cnb.cool
    - alice@example.com
    - alice-contact@example.com

示例

bash
$ cnb-rs user emails

# JSON 拿全字段(含 system_email_contact 布尔值)
$ cnb-rs --json user emails | jq '.emails | length'
3

另请参阅

Released under the MIT License.