Add list_forks tool to repos toolset

未關閉 適合新手
#3,992 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 2 天內回覆

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
76/100
Issue 類型
功能
描述清晰度
描述清楚
活躍度
活躍
技術堆疊
github, go
領域
api

研究方向

先閱讀現有的 list_starred_repositories 和 search_repositories 工具,接著在 repos 工具集中沿用它們的模式。使用 issue 中描述的輸入呼叫 client.Repositories.ListForks,並回傳 []MinimalRepository。新增單元測試和文件;當工具支援列出的選項,並以相符的輸出格式回傳 fork 時,即表示完成。

由索引模型根據 Issue 內容生成。

描述

enhancement
Describe the feature or problem you'd like to solve

The server provides fork_repository to create forks, but lacks a corresponding tool to list forks of a given repository.

In #207 / PR #250, fork listing was directed to search_repositories. While qualifiers like fork:only work for listing a specific user's forks (user:X fork:only), GitHub's Search API has no parent:owner/repo qualifier. As a result, search_repositories cannot reliably list downstream forks of an arbitrary repository without brittle keyword matching against repo names.

Proposed solution

Add a list_forks tool under the repos toolset backed by GET /repos/{owner}/{repo}/forks via go-github's client.Repositories.ListForks:

  • Inputs: owner, repo, optional sort (newest, oldest, stargazers, watchers), direction (asc, desc), page, perPage.
  • Output: []MinimalRepository (matching list_starred_repositories and search_repositories).
Example prompts or workflows
  • "Find active or top-starred community forks of owner/repo."
  • "List recent forks of owner/repo to see if contributors have started working on patches."
Additional context

Implementation is straightforward with client.Repositories.ListForks. I can open a PR with unit tests and doc updates if you're open to this addition.

主要語言
Go
星號
34.8k
分支
5.4k
平均合併
2 天 15 小時
30 天內合併 PR
34

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。