gh-review-requests
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGitHub Review Requests
GitHub审查请求
Fetch unread notifications for open (unmerged) PRs, filtered by a GitHub team.
review_requestedRequires: GitHub CLI () authenticated.
gh获取针对未合并(open)PR的未读通知,并按GitHub团队进行筛选。
review_requested要求:已完成GitHub CLI ()的身份验证。
ghStep 1: Identify the Team
步骤1:确定团队
If the user has not specified a team, ask:
Which GitHub team should I filter by? (e.g.)streaming-platform
Accept either a team slug () or a display name ("Streaming Platform") — convert to lowercase-hyphenated slug before passing to the script.
streaming-platform如果用户未指定团队,请询问:
我应该按哪个GitHub团队进行筛选?(例如:)streaming-platform
接受团队别名(slug,如)或显示名称(如“Streaming Platform”)——在传入脚本前转换为小写连字符格式的别名。
streaming-platformStep 2: Run the Script
步骤2:运行脚本
bash
uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_review_requests.py --org getsentry --teams <team-slug>To filter by multiple teams, pass a comma-separated list:
bash
uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_review_requests.py --org getsentry --teams <team slugs>bash
uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_review_requests.py --org getsentry --teams <team-slug>如需按多个团队筛选,请传入逗号分隔的列表:
bash
uv run ${CLAUDE_SKILL_ROOT}/scripts/fetch_review_requests.py --org getsentry --teams <team slugs>Script output
脚本输出
json
{
"total": 3,
"prs": [
{
"notification_id": "12345",
"title": "feat(kafka): add workflow to restart a broker",
"url": "https://github.com/getsentry/ops/pull/19144",
"repo": "getsentry/ops",
"pr_number": 19144,
"author": "bmckerry",
"reasons": ["opened by: bmckerry"]
}
]
}reasons- — the team is a requested reviewer
"review requested from: <Team Name>" - — the PR author is a team member
"opened by: <login>"
json
{
"total": 3,
"prs": [
{
"notification_id": "12345",
"title": "feat(kafka): add workflow to restart a broker",
"url": "https://github.com/getsentry/ops/pull/19144",
"repo": "getsentry/ops",
"pr_number": 19144,
"author": "bmckerry",
"reasons": ["opened by: bmckerry"]
}
]
}reasons- — 该团队是被请求的审查方
"review requested from: <Team Name>" - — PR的发起者是团队成员
"opened by: <login>"
Step 3: Present Results
步骤3:展示结果
Display results as a markdown table with full URLs:
| # | Title | URL | Reason |
|---|---|---|---|
| 1 | feat(kafka): add workflow to restart a broker | https://github.com/getsentry/ops/pull/19144 | opened by: evanh |
If is 0, say: "No unread review requests found for that team."
total将结果以Markdown表格形式展示,包含完整URL:
| # | 标题 | URL | 原因 |
|---|---|---|---|
| 1 | feat(kafka): add workflow to restart a broker | https://github.com/getsentry/ops/pull/19144 | opened by: evanh |
如果为0,请回复:“未找到该团队的未读审查请求。”
totalFallback
备选方案
If the script fails, run manually:
bash
gh api notifications --paginateThen for each notification, check:
review_requested- — skip if
gh api repos/{repo}/pulls/{number}orstate == "closed"is setmerged_at - — check
gh api repos/{repo}/pulls/{number}/requested_reviewersteams[].name - — check if author is a member
gh api orgs/{org}/teams/{slug}/members
如果脚本运行失败,请手动执行以下命令:
bash
gh api notifications --paginate然后针对每个通知,检查:
review_requested- — 如果
gh api repos/{repo}/pulls/{number}或已设置state == "closed",则跳过merged_at - — 检查
gh api repos/{repo}/pulls/{number}/requested_reviewersteams[].name - — 检查发起者是否为团队成员
gh api orgs/{org}/teams/{slug}/members