Loading...
Loading...
Compare original and translation side by side
ghgh| Task | Command |
|---|---|
| Check if PR exists | |
| View PR with issue comments | |
| Fetch review comments (code-level) | |
| Extract key fields | |
| 任务 | 命令 |
|---|---|
| 检查PR是否存在 | |
| 查看包含议题评论的PR | |
| 获取评审评论(代码级) | |
| 提取关键字段 | |
gh pr view --json number --jq '.number'gh api repos/{owner}/{repo}/pulls/{n}/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'gh api repos/OWNER/REPO/pulls/$(gh pr view --json number -q .number)/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'gh pr view --json number --jq '.number'gh api repos/{owner}/{repo}/pulls/{n}/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'gh api repos/OWNER/REPO/pulls/$(gh pr view --json number -q .number)/comments \
--jq '.[] | {path: .path, line: .line, body: .body}'| Type | What it shows | How to get |
|---|---|---|
| Issue comments | PR-level discussion | |
| Review comments | Code-level feedback | |
| 类型 | 展示内容 | 获取方式 |
|---|---|---|
| 议题评论 | PR层面的讨论 | |
| 评审评论 | 代码级反馈 | |
gh pr view 2>/dev/null && echo "PR exists" || echo "No PR"gh pr view --commentsgh pr view 429 --repo owner/repo --commentsgh pr view 2>/dev/null && echo "PR exists" || echo "No PR"gh pr view --commentsgh pr view 429 --repo owner/repo --commentsgh pr creategh pr diffgh pr mergegh pr creategh pr diffgh pr merge