首页/ AI 技能 / @skilllib/skill-2117939930272412919
Skill站外收录 @skilllib/skill-2117939930272412919

fetch-unresolved-comments

通过 GitHub GraphQL API 获取指定拉取请求中未解决的代码评审意见,自动过滤已解决和过时的反馈,按文件组织评论内容并返回原始讨论上下文,适用于聚焦待处理审查建议的协作场景。

0.0 (0) 12 次安装 原作者 编程导航
收录于 2026-01-22
开发运维 AI 技能

Skills.MD

# 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 1. **Get PR URL**: - First check for environment variables: - If `PR_NUMBER` and `GITHUB_REPOSITORY` are set, construct URL as `https://github.com/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}` - Otherwise: - Use `gh pr view --json url -q '.url'` to get the current branch's PR URL 2. **Run the skill**: ```bash uv run skills fetch-unresolved-comments <pr_url> ``` Example: ```bash uv run skills fetch-unresolved-comments https://github.com/mlflow/mlflow/pull/18327 ``` The script automatically reads the GitHub token from: - `GH_TOKEN` environment variable, or - `gh auth token` command if environment variables are not set ## Example Output ```json { "total": 3, "by_file": { ".github/workflows/resolve.yml": [ { "thread_id": "PRRT_kwDOAL...", "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...", "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" } ] } ] } } ```

评论 0

还没有评论,来抢沙发。