跳转到内容

cnb-rs pr review-comments

cnb-rs pr review-comments <NUMBER> --review-id <ID> [-L <N>]

列出指定 PR review 下的所有评论(行级 line comment + 整体)。与 pr review(提交 / 回复)互补:本命令是「读」侧,看某次 review 的细节评论。

参数

  • <NUMBER>: PR 编号

选项

  • --review-id <ID>: Review ID(从 pr view --reviews 获取)
  • -L, --limit <N>: 每页数量(默认 50)
  • --page <N>: 页码(默认 1)

输出列

含义
ID评论 ID
AUTHOR评论者 username
PATH:LINE行级评论的文件路径 + 行号(整体评论该列为空)
BODY评论正文首行

示例

bash
# 列 PR #123 review 456 下的评论
cnb-rs --repo wwvo/cnb-rs/cnb-rs pr review-comments 123 --review-id 456

# JSON 输出(拿完整 body / diff_hunk 等)
cnb-rs --repo wwvo/cnb-rs/cnb-rs pr review-comments 123 --review-id 456 --json

典型工作流

bash
# 1. 列 PR 的所有 review
cnb-rs pr view 123 --reviews --json | jq '.reviews[].id'

# 2. 选一个 review_id,看下面的评论
cnb-rs pr review-comments 123 --review-id 456

API

GET ${CNB_API_ENDPOINT}/{repo}/-/pulls/{number}/reviews/{review_id}/comments

另请参阅

Released under the MIT License.