fetch-unresolved-comments
Fetch unresolved PR review comments using GitHub GraphQL API, filtering out resolved and outdated feedback.
它会碰到什么
扫了多少2 个文本文件,3 KB
它会碰到什么联网
命中总数1 处
命中统计严重 0 · 高 0 · 中 0 · 低 1
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
Fetch Unresolved PR Review Comments
Uses GitHub's GraphQL API to fetch only unresolved review thread comments from a pull request.
When to Use
- You need to get only unresolved review comments from a PR
- You want to filter out already-resolved and outdated feedback
Instructions
- Parse PR information:
- First check for environment variables:
- If
PR_NUMBERandGITHUB_REPOSITORYare set, read them and parseGITHUB_REPOSITORYasowner/repoand usePR_NUMBERdirectly - Otherwise:
- Use
gh pr view --json url -q '.url'to get the current branch's PR URL and parse to extract owner, repo, and PR number
- Run the Python script:
GITHUB_TOKEN=$(gh auth token) \
uv run python .claude/skills/fetch-unresolved-comments/fetch_unresolved_comments.py <owner> <repo> <pr_number>
- Script options:
--token <token>: Provide token explicitly (default: GITHUB_TOKEN or GH_TOKEN env var)
- Parse the JSON output:
The script always outputs JSON with:
total: Total number of unresolved comments across all threadsby_file: Review threads grouped by file path (each thread contains multiple comments in a conversation)
Example JSON Output
{
"total": 3,
"by_file": {
".github/workflows/resolve.yml": [
{
"thread_id": "PRRT_kwDOAL...",
"isOutdated": false,
"line": 40,
"startLine": null,
"diffHunk": "@@ -0,0 +1,245 @@\n+name: resolve...",
"comments": [
{
"id": 2437935275,
"body": "We can remove this once we get the key.",
"author": "harupy",
"createdAt": "2025-10-17T00:53:20Z"
},
{
"id": 2437935276,
"body": "Good catch, I'll update it.",
"author": "contributor",
"createdAt": "2025-10-17T01:10:15Z"
}
]
}
],
".gitignore": [
{
"thread_id": "PRRT_kwDOAL...",
"isOutdated": false,
"line": 133,
"startLine": null,
"diffHunk": "@@ -130,0 +133,2 @@\n+.claude/*",
"comments": [
{
"id": 2437935280,
"body": "Should we add this to .gitignore?",
"author": "reviewer",
"createdAt": "2025-10-17T01:15:42Z"
}
]
}
]
}
}想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
星标★ 398
本站分层T2
该仓技能数2148
原文件路径
skills_all/fetch-unresolved-comments/SKILL.md同一个仓库里的其他技能
同名技能的其他版本
有 2 个不同仓库或目录里都有叫 fetch-unresolved-comments 的技能。它们内容并不相同,别混用:
- Microck/ordinary-claude-skills — Fetch unresolved PR review comments using GitHub GraphQL API, filtering out resolved and o