mcpField
F
fetch-unresolved-comments

fetch-unresolved-comments

github.com/mlflowテスト・品質28.6k39 回インストール今日更新
リポジトリ

fetch-unresolved-comments について

GitHub GraphQL API を使い、プルリクエストの未解決レビュー スレッドだけを取得するスキルです。対応が必要なフィードバックに集中できます。

主な機能

  1. 01未解決レビュー スレッドの取得
  2. 02プルリクエスト URL の指定
  3. 03現在のブランチの PR URL を特定
  4. 04環境変数または gh から GitHub トークンを取得

活用シーン

  1. 01対応が必要なレビューコメントの確認
  2. 02PR レビューから解決済みスレッドを除外

インストール

コマンドをコピーしてターミナルで実行します。

$npx skills add https://github.com/mlflow/mlflow --skill fetch-unresolved-comments

インストール後、Claude Code で/fetch-unresolved-commentsを入力して読み込まれたか確認します。

詳細

未解決のPRレビューコメントを取得する

GitHubのGraphQL APIを使用して、プルリクエストから未解決のレビューコメントのみを取得します。

使用する場面

  • PRから未解決のレビューコメントのみを取得する必要がある場合
  • 解決済みのフィードバックを除外したい場合

手順

  1. PRのURLを取得する:

    • まず、環境変数を確認します。
      • PR_NUMBERとGITHUB_REPOSITORYが設定されている場合は、URLをhttps://github.com/${GITHUB_REPOSITORY}/pull/${PR_NUMBER}として構成します
    • それ以外の場合:
      • gh pr view --json url -q '.url'を使用して、現在のブランチのPR URLを取得します
  2. スキルを実行する:

    uv run skills fetch-unresolved-comments <pr_url>
    

    例:

    uv run skills fetch-unresolved-comments https://github.com/mlflow/mlflow/pull/18327
    

    スクリプトは、以下からGitHubトークンを自動的に読み取ります。

    • GH_TOKEN環境変数、または
    • 環境変数が設定されていない場合は、gh auth tokenコマンド

出力例

{
  "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"
          }
        ]
      }
    ]
  }
}

コメント