You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Extract newMinimalCommitFromCore to share field mapping between
convertToMinimalCommit (RepositoryCommit) and the new
convertCommitResultToMinimalCommit (CommitResult), removing ~50
lines of duplicated logic from the search_commits handler.
- Add MinimalRepoRef and a Repository field on MinimalCommit so
cross-repo commit search results identify the repo each commit
came from (the API returns it; we were trimming it away).
- Rewrite the query description to teach the model the actual
commit-search qualifier surface (repo:/org:/user: scoping, author/
committer/date qualifiers, hash/tree/parent, merge:, is:public)
and reword the sort description to drop redundancy with the enum.
- Extend tests to assert the repository field is surfaced and to
cover commits with no resolved GitHub user (nil Author/Committer).
- Refresh README and toolsnap.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
-`sort`: Sort field ('author-date' or 'committer-date') (string, optional)
1310
+
-`query`: Commit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier match across all of GitHub and are usually not what you want). Other qualifiers: `author:`, `committer:`, `author-name:`, `committer-name:`, `author-email:`, `committer-email:`, `author-date:`, `committer-date:` (supports `>`, `<`, `>=`, `<=`, and `YYYY-MM-DD..YYYY-MM-DD` ranges), `merge:true|false`, `hash:`, `tree:`, `parent:`, `is:public`. Examples: `repo:owner/repo fix panic`; `org:github author:defunktcommitter-date:>=2024-01-01`; `"refactor cache" repo:o/r`; `hash:abc1234 repo:o/r`. (string, required)
1311
+
-`sort`: Sort by author or committerdate (defaults to best match) (string, optional)
Copy file name to clipboardExpand all lines: pkg/github/__toolsnaps__/search_commits.snap
+3-3Lines changed: 3 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
"readOnlyHint": true,
4
4
"title": "Search commits"
5
5
},
6
-
"description": "Search for commits across GitHub repositories using specialized commit search syntax. Great for finding specific changes, authors, or messages.",
6
+
"description": "Search for commits across GitHub repositories using GitHub's commit search syntax. Useful for finding specific changes, authors, or messages across one or many repositories. Searches the default branch only.",
"description": "Commit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier match across all of GitHub and are usually not what you want). Other qualifiers: `author:`, `committer:`, `author-name:`, `committer-name:`, `author-email:`, `committer-email:`, `author-date:`, `committer-date:` (supports `\u003e`, `\u003c`, `\u003e=`, `\u003c=`, and `YYYY-MM-DD..YYYY-MM-DD` ranges), `merge:true|false`, `hash:`, `tree:`, `parent:`, `is:public`. Examples: `repo:owner/repo fix panic`; `org:github author:defunktcommitter-date:\u003e=2024-01-01`; `\"refactor cache\" repo:o/r`; `hash:abc1234 repo:o/r`.",
30
30
"type": "string"
31
31
},
32
32
"sort": {
33
-
"description": "Sort field ('author-date' or 'committer-date')",
33
+
"description": "Sort by author or committerdate (defaults to best match)",
Description: "Commit search query (GitHub commit search REST). Searches commit messages on the default branch only. Scope the search with `repo:owner/repo`, `org:`, or `user:` (queries without a scope qualifier match across all of GitHub and are usually not what you want). Other qualifiers: `author:`, `committer:`, `author-name:`, `committer-name:`, `author-email:`, `committer-email:`, `author-date:`, `committer-date:` (supports `>`, `<`, `>=`, `<=`, and `YYYY-MM-DD..YYYY-MM-DD` ranges), `merge:true|false`, `hash:`, `tree:`, `parent:`, `is:public`. Examples: `repo:owner/repo fix panic`; `org:github author:defunktcommitter-date:>=2024-01-01`; `\"refactor cache\" repo:o/r`; `hash:abc1234 repo:o/r`.",
491
490
},
492
491
"sort": {
493
492
Type: "string",
494
-
Description: "Sort field ('author-date' or 'committer-date')",
493
+
Description: "Sort by author or committerdate (defaults to best match)",
Description: t("TOOL_SEARCH_COMMITS_DESCRIPTION", "Search for commits across GitHub repositories using specialized commit search syntax. Great for finding specific changes, authors, or messages."),
510
+
Description: t("TOOL_SEARCH_COMMITS_DESCRIPTION", "Search for commits across GitHub repositories using GitHub's commit search syntax. Useful for finding specific changes, authors, or messages across one or many repositories. Searches the default branch only."),
0 commit comments