跳转到内容

cnb-rs pr status ​

cnb-rs pr status

显示当前仓库中与我相关的 PR 状态概览。

参考 gh pr status,分栏展示:

  • Current branch — 当前 git 分支关联的 open PR(含 mergeable 状态)
  • Created by you — 我创建的 open PR(最多 10 条)
  • Requesting a code review from you — 需要我评审的 open PR(最多 10 条)

每栏按 -updated_at(最近更新优先)排序。

示例 ​

bash
# 查看当前仓库 PR 状态
cnb-rs pr status

# 指定仓库
cnb-rs pr status --repo wwvo/cnb-rs/cnb-rs

# JSON 输出
cnb-rs pr status --json

输出格式 ​

Relevant pull requests in wwvo/cnb-rs/cnb-rs

Current branch
  #42    添加 npm 分发支持                       [feature/npm → main] ✓ Mergeable

Created by you
  #42    添加 npm 分发支持                       [feature/npm → main] ✓ Mergeable 约 2 小时前
  #38    重构 auth 模块                          [refactor/auth → main] 约 3 天前

Requesting a code review from you
  #45    修复 CI 构建问题                        [fix/ci → main] × Conflict 约 1 小时前

Mergeable 状态标记 ​

标记含义
✓ Mergeable无冲突,可合并
× Conflict存在合并冲突
⋯ Checking正在检查中
× No merge base无共同祖先

JSON 输出 ​

json
{
  "currentBranch": { ... } | null,
  "createdBy": [...],
  "needsReview": [...]
}

继承的全局选项:

  • --repo <REPO>: 指定仓库路径(格式:group/repo)
  • --json: 以 JSON 格式输出
  • --domain <DOMAIN>: 指定目标域名(默认:cnb.cool)

Released under the MIT License.