# Fetch Unresolved Comments

> Fetch unresolved PR review comments using GitHub GraphQL API, filtering out resolved feedback. Use when this capability is needed.

- Skill: `tomevault-io/fetch-unresolved-comments` (Agent Skill, multi-file: 2 files)
- Install (CLI): `npx skillmds@latest add tomevault-io/fetch-unresolved-comments`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tomevault-io/fetch-unresolved-comments/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Integrations & APIs
- Author: tomevault-io (https://skillmd.com/u/tomevault-io)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/tomevault-io/fetch-unresolved-comments

---


# 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 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"
          }
        ]
      }
    ]
  }
}
```

---
> Converted and distributed by [TomeVault](https://tomevault.io/claim/mlflow) — claim your Tome and manage your conversions.
<!-- tomevault:4.0:skill_md:2026-04-11 -->

