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
constgitVersionTypeStrings=Object.values(GitVersionType).filter((value): value is string=>typeofvalue==="string");
1740
-
1741
1739
server.tool(
1742
1740
REPO_TOOLS.search_commits,
1743
-
"Search for commits in a repository with comprehensive filtering capabilities. Supports searching by description/comment text, time range, author, committer, specific commit IDs, and more. This is the unified tool for all commit search operations.",
1741
+
"Search for commits in a repository with comprehensive filtering capabilities. Supports searching by description/comment text, time range, authorand more.",
1744
1742
{
1745
-
project: z.string().describe("Project name or ID"),
1746
-
repository: z.string().describe("Repository name or ID"),
includeWorkItems: z.boolean().optional().default(false).describe("Include associated work items"),
1760
-
// Enhanced search parameters
1761
-
searchText: z.string().optional().describe("Search text to filter commits by description/comment. Supports partial matching."),
1762
-
author: z.string().optional().describe("Filter commits by author email or display name"),
1763
-
authorEmail: z.string().optional().describe("Filter commits by exact author email address"),
1764
-
committer: z.string().optional().describe("Filter commits by committer email or display name"),
1765
-
committerEmail: z.string().optional().describe("Filter commits by exact committer email address"),
1766
-
fromDate: z.string().optional().describe("Filter commits from this date (ISO 8601 format, e.g., '2024-01-01T00:00:00Z')"),
1767
-
toDate: z.string().optional().describe("Filter commits to this date (ISO 8601 format, e.g., '2024-12-31T23:59:59Z')"),
1768
-
commitIds: z.array(z.string()).optional().describe("Array of specific commit IDs to retrieve. When provided, other filters are ignored except top/skip."),
1769
-
historySimplificationMode: z.enum(["FirstParent","SimplifyMerges","FullHistory","FullHistorySimplifyMerges"]).optional().describe("How to simplify the commit history"),
1747
+
.describe("The names of the projects to search within. If omitted, searches across all projects in the organization."),
1748
+
repository: z.array(z.string()).optional().describe("The names of the repositories to search within. If omitted, searches across all repositories in the specified projects."),
1749
+
branch: z.array(z.string()).optional().describe("The names of the repository branches to search within. If omitted, searches across all branches in the specified repositories."),
1750
+
author: z.array(z.string()).optional().describe("The names of the commit authors to search for. Only full display names are supported."),
1751
+
commitStartDate: z.string().optional().describe("Filter commits from this date (format: 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:MM:SS')"),
1752
+
commitEndDate: z.string().optional().describe("Filter commits up to this date (format: 'YYYY-MM-DD' or 'YYYY-MM-DDTHH:MM:SS', e.g. '2025-06-19T23:59:59' for full day)"),
1753
+
orderBy: z.enum(["ASC","DESC"]).optional().describe("Sort commits by date: 'ASC' for oldest-first, 'DESC' for newest-first. Defaults to relevance if omitted."),
1754
+
includeFacets: z.boolean().default(false).describe("Include facets in the search results"),
1755
+
skip: z.coerce.number().default(0).describe("Number of results to skip"),
1756
+
top: z.coerce.number().default(10).describe("Maximum number of results to return"),
1770
1757
},
1771
-
async({
1772
-
project,
1773
-
repository,
1774
-
fromCommit,
1775
-
toCommit,
1776
-
version,
1777
-
versionType,
1778
-
skip,
1779
-
top,
1780
-
includeLinks,
1781
-
includeWorkItems,
1782
-
searchText,
1783
-
author,
1784
-
authorEmail,
1785
-
committer,
1786
-
committerEmail,
1787
-
fromDate,
1788
-
toDate,
1789
-
commitIds,
1790
-
historySimplificationMode,
1791
-
})=>{
1792
-
try{
1793
-
constconnection=awaitconnectionProvider();
1794
-
constgitApi=awaitconnection.getGitApi();
1795
-
1796
-
// If specific commit IDs are provided, use getCommits with commit ID filtering
0 commit comments