返回 Skill 列表
extension
分类: 开发与工程无需 API Key

my-pr-comments

加载当前分支的拉取请求评审评论。

person作者: jakexiaohubgithub

Get the current pr number:

gh pr view --json "url" | jq '.url'

Now you can run this command to get all the pr comments in JSON

gh api repos/corpaxe/{reponame}/pulls/{prnumber}/comments --paginate --jq '.[] | {file: .path, line: .line, body: .body, author: .user.login}'

Example:

gh pr view --json "url" | jq '.url'

# outputs
"https://github.com/corpaxe/External.Frontend/pull/2972"

gh api   repos/corpaxe/External.Frontend/pulls/2976/comments | jq '.[] | {file: .path, line: .line, body: .body, author: .user.login}'