Add repository-wide commit search across branches
維護者通常 1 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
先閱讀現有的 search_commits 和 list_commits 工具實作及其 GitHub API 呼叫。檢查 API 是否支援使用作者和日期篩選條件在整個儲存庫中尋找提交,然後找出適當的工具設計與測試。完成的標準是:能夠跨非預設分支傳回相符的提交,並提供分頁以及有用的 SHA 或 ref 中繼資料。
由索引模型根據 Issue 內容生成。
描述
Describe the feature or problem you’d like to solve
The current search_commits tool searches commit messages on the repository's default branch only. This makes it difficult to reliably discover work performed by a developer on feature, bugfix, or other non-default branches that have not yet been merged.
For example, a developer may make several commits on feature/worklog-ai during the day while the repository's default branch is development. Those commits will not be returned by search_commits until they are merged into the default branch.
Using list_commits does allow specifying a branch through the sha parameter, but discovering a user's activity across an entire repository would then require listing branches and querying commits for each branch individually. This becomes inefficient for repositories with a large number of branches and also creates significant duplication because branches frequently share commit history.
A repository-wide way to find commits by author and date, independent of the branch on which they currently exist, would make the MCP server much more useful for developer activity, worklog, analytics, and code-agent workflows.
Proposed solution
Add a tool or extend an existing tool to support repository-wide commit discovery across branches.
For example:
search_repository_commits
Parameters could include:
owner— Repository ownerrepo— Repository nameauthor— GitHub username or emailsince— Start of the time range in ISO 8601 formatuntil— End of the time range in ISO 8601 formatpage— Pagination pageperPage— Results per page
The tool should return commits belonging to the specified repository and matching the author/date filters regardless of whether the commits are currently reachable from the default branch.
Ideally, results should include the commit SHA and enough metadata to identify the relevant branch/ref when possible.
The implementation should avoid requiring clients to enumerate every repository branch and call list_commits separately for each branch.
An alternative would be to extend search_commits with an explicit repository-wide/non-default-branch mode if that fits the existing tool design better.
Example prompts or workflows (for tools/toolsets only)
-
"Show me everything I committed to
owner/repositorytoday, including commits on feature branches that haven't been merged yet." -
"Find all commits by
usernameinowner/repositorybetween August 31 and September 1, regardless of which branch they were made on." -
"Generate a daily worklog for
usernamebased on all commits made in this repository today, including unmerged feature branches." -
"Find all work performed by
usernamein this repository during the last 7 days, including commits that are not present on the default branch." -
"List the commits made by
usernamein this repository today and group them by branch or related work."
Additional context
This is particularly useful for developer productivity and worklog workflows.
A common development workflow is for developers to work on feature or bugfix branches and merge them into main/development later. A daily activity query should not require those commits to already be merged.
The current search_commits behavior is documented as searching commit messages on the default branch only. list_commits can target a specific branch using sha, but using it to discover all user activity requires enumerating branches, which does not scale well for repositories with many branches.
The desired behavior is therefore a repository-level activity query that can efficiently identify commits by author and time range without requiring clients to know the relevant branches beforehand.
- 主要語言
- Go
- 星號
- 33.3k
- 分支
- 5.1k
- 平均合併
- 22 小時 46 分鐘
- 30 天內合併 PR
- 17
環境準備
- 提供 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
github/github-mcp-server 的其他 Issue
-
pull_request_read drops merge_commit_sha可能已有人在做 @thejdubb02 於 27 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 84/100
github/github-mcp-server#3235 · 1 則留言 ·
維護者通常 1 天內回覆
-
Add guidance on GitHub autolinked reference formatting for AI agents可能重新可做 關聯的 PR 已關閉且未合併。 未關閉enhancement
難度 1/5 1 小時以內 新手友好度 88/100
github/github-mcp-server#3042 · 2 則留言 ·
維護者通常 1 天內回覆
-
Incorrect install documentation leads to error "error: unknown option '-e'"可能已有人在做 @syf2211 於 56 天前認領。 未關閉bug
難度 2/5 1-3 小時 新手友好度 72/100
github/github-mcp-server#3032 · 1 則留言 · 1 個 reaction ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 74/100
github/github-mcp-server#2803 · 1 則留言 ·
維護者通常 1 天內回覆
-
get_discussion and get_discussion_comments accept calls with missing required parameters instead of returning a validation error可能已有人在做 @rodboev 於 106 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 76/100
github/github-mcp-server#2740 ·
維護者通常 1 天內回覆
查看 github/github-mcp-server 的全部 Issue