Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ GitHub webhooks + GitHub API

### `search_issues`

GitHub の issue / pull request / release / documentation / commit diff を対象にした統合検索ツールです。
GitHub の issue / pull request / release / documentation / commit diff / comment 系 (issue と PR の top-level comment、PR review 本文、PR インラインレビューコメント) を対象にした統合検索ツールです。

`query` と `sort` の組み合わせで、以下の 3 モードを切り替えます。

Expand All @@ -95,6 +95,8 @@ GitHub の issue / pull request / release / documentation / commit diff を対

structured filter (`repo` / `state` / `labels` / `milestone` / `assignee` / `type`) はすべてのモードで有効です。

bot (`sender.login` が `[bot]` で終わる) と trim 後 10 文字未満の body は ingest 時点で除外されます。`LGTM` / `+1` / CI ノイズなどは retrieval 面に残りません。

#### パラメータ

| 名前 | 型 | 説明 |
Expand All @@ -105,7 +107,7 @@ structured filter (`repo` / `state` / `labels` / `milestone` / `assignee` / `typ
| `labels` | string[] | label 名で AND 絞り込み。 |
| `milestone` | string | milestone title で絞り込み。 |
| `assignee` | string | assignee login で絞り込み。 |
| `type` | `"issue"` / `"pull_request"` / `"release"` / `"doc"` / `"diff"` / `"all"` | type で絞り込み (既定 `all`)。 |
| `type` | 下記参照 | type で絞り込み (既定 `all`)。 |
| `top_k` | number | 最大件数 (既定 10、上限 50)。 |
| `fusion` | `"rrf"` / `"dense_only"` / `"sparse_only"` | fusion 戦略 (既定 `rrf`)。scan モードでは無視。 |
| `rerank` | boolean | cross-encoder rerank (既定 `true`)。scan モードでは無視。 |
Expand All @@ -114,6 +116,20 @@ structured filter (`repo` / `state` / `labels` / `milestone` / `assignee` / `typ
| `until` | ISO 8601 文字列 | `updated_at < until` の結果だけを残します。 |
| `include_content` | boolean | 上位 doc 結果に本文を inline する (既定 `false`)。 |

#### `type` 値

| 値 | 対象 |
|----|------|
| `"issue"` | GitHub issue (title + body)。 |
| `"pull_request"` | pull request 本文 (title + body)。 |
| `"release"` | release notes (name + body)。 |
| `"doc"` | Markdown documentation。 |
| `"diff"` | commit の per-file diff (commit message + file path + patch)。 |
| `"issue_comment"` | issue と PR の top-level コメント。 |
| `"pr_review"` | PR レビュー本文 (`APPROVED` / `CHANGES_REQUESTED` / `COMMENTED`)。 |
| `"pr_review_comment"` | PR の per-line インラインレビューコメント。 |
| `"all"` | 上記すべての union (既定)。 |

#### 使用例

特定トピックの意味検索:
Expand Down Expand Up @@ -147,6 +163,16 @@ structured filter (`repo` / `state` / `labels` / `milestone` / `assignee` / `typ
}
```

特定トピックに関する過去の PR review 判断を検索:

```json
{
"query": "rerank threshold tuning",
"type": "pr_review",
"top_k": 5
}
```

## Repository Structure

```text
Expand Down
32 changes: 29 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,18 @@ This MCP server exposes a single consolidated tool. All retrieval modes — sema

### `search_issues`

Unified search across GitHub issues, pull requests, releases, repository documentation, and commit diffs.
Unified search across GitHub issues, pull requests, releases, repository documentation, commit diffs, and comment / review surfaces (top-level comments on issues and PRs, PR review bodies, and PR inline review comments).

Three modes are selected by the combination of `query` and `sort`:

1. **Hybrid semantic search (default)** — dense BGE-M3 over Vectorize + sparse BM25 over D1 FTS5, fused via Reciprocal Rank Fusion (RRF, k=60), then re-scored with the `@cf/baai/bge-reranker-base` cross-encoder. Pass a natural-language `query`.
2. **Time-ordered activity scan** — omit or leave `query` empty and set `sort` to `"updated_desc"` or `"created_desc"`. Optionally narrow with `since` / `until` to list recent issue / PR / release / doc / diff activity. This subsumes the previous `list_recent_activity` tool.
2. **Time-ordered activity scan** — omit or leave `query` empty and set `sort` to `"updated_desc"` or `"created_desc"`. Optionally narrow with `since` / `until` to list recent activity across every type. This subsumes the previous `list_recent_activity` tool.
3. **Doc content fetch** — set `include_content: true`. For result rows whose `type` is `"doc"`, the raw file content is fetched from the GitHub contents API and inlined as a `content` field. Capped at the first few doc rows to bound API fan-out. This subsumes the previous `get_doc_content` tool.

Structured filters (`repo`, `state`, `labels`, `milestone`, `assignee`, `type`) apply in every mode.

Bot-authored comments (`sender.login` ending in `[bot]`) and comments shorter than 10 characters (trimmed) are filtered out at ingest time so noise such as `LGTM`, `+1`, or CI chatter does not dilute the retrieval surface.

#### Parameters

| Name | Type | Description |
Expand All @@ -105,7 +107,7 @@ Structured filters (`repo`, `state`, `labels`, `milestone`, `assignee`, `type`)
| `labels` | string[] | Filter by label names (AND). |
| `milestone` | string | Filter by milestone title. |
| `assignee` | string | Filter by assignee login. |
| `type` | `"issue"` \| `"pull_request"` \| `"release"` \| `"doc"` \| `"diff"` \| `"all"` | Filter by type (default `all`). |
| `type` | see below | Filter by type (default `all`). |
| `top_k` | number | Max results (default 10, max 50). |
| `fusion` | `"rrf"` \| `"dense_only"` \| `"sparse_only"` | Fusion strategy (default `rrf`). Ignored in scan mode. |
| `rerank` | boolean | Cross-encoder rerank (default `true`). Ignored in scan mode. |
Expand All @@ -114,6 +116,20 @@ Structured filters (`repo`, `state`, `labels`, `milestone`, `assignee`, `type`)
| `until` | ISO 8601 string | Keep only results with `updated_at < until`. |
| `include_content` | boolean | Inline raw content on top doc results (default `false`). |

#### `type` values

| Value | Surface |
|-------|---------|
| `"issue"` | GitHub issues (title + body). |
| `"pull_request"` | Pull request descriptions (title + body). |
| `"release"` | Release notes (name + body). |
| `"doc"` | Markdown documentation files. |
| `"diff"` | Per-file commit diffs (commit message + file path + patch). |
| `"issue_comment"` | Top-level comments on issues and PRs. |
| `"pr_review"` | PR review bodies (`APPROVED` / `CHANGES_REQUESTED` / `COMMENTED`). |
| `"pr_review_comment"` | PR inline review comments (per-line diff comments). |
| `"all"` | Union of every type above (default). |

#### Examples

Semantic search for a specific topic:
Expand Down Expand Up @@ -147,6 +163,16 @@ Semantic search with inline doc content on the top doc hits:
}
```

Search past PR review judgments about a specific topic:

```json
{
"query": "rerank threshold tuning",
"type": "pr_review",
"top_k": 5
}
```

## Repository Structure

```text
Expand Down
Loading
Loading