From fef360664e0577f4d5ff1238f149ee2ffcb1d471 Mon Sep 17 00:00:00 2001 From: Martim Pimentel Date: Thu, 22 May 2025 19:28:37 +0100 Subject: [PATCH] feat: rename ignored_files_regex to excluded_file_patterns and update descriptions for clarity --- index.ts | 4 ++-- schemas.ts | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/index.ts b/index.ts index 0121014..ee4b695 100644 --- a/index.ts +++ b/index.ts @@ -2476,8 +2476,8 @@ server.setRequestHandler(CallToolRequestSchema, async (request) => { args.straight ); - if (args.ignored_files_regex?.length) { - const regexPatterns = args.ignored_files_regex.map(pattern => new RegExp(pattern)); + if (args.excluded_file_patterns?.length) { + const regexPatterns = args.excluded_file_patterns.map(pattern => new RegExp(pattern)); // Helper function to check if a path matches any regex pattern const matchesAnyPattern = (path: string): boolean => { diff --git a/schemas.ts b/schemas.ts index 75c2843..6b84ae4 100644 --- a/schemas.ts +++ b/schemas.ts @@ -35,7 +35,7 @@ export const GitLabUsersResponseSchema = z.record( // Base schema for project-related operations const ProjectParamsSchema = z.object({ - project_id: z.string().describe("Project ID or URL-encoded path"), // Changed from owner/repo to match GitLab API + project_id: z.string().describe("Project ID or complete URL-encoded path to project"), // Changed from owner/repo to match GitLab API }); export const GitLabNamespaceSchema = z.object({ id: z.number(), @@ -633,7 +633,9 @@ export const GetBranchDiffsSchema = ProjectParamsSchema.extend({ from: z.string().describe("The base branch or commit SHA to compare from"), to: z.string().describe("The target branch or commit SHA to compare to"), straight: z.boolean().optional().describe("Comparison method: false for '...' (default), true for '--'"), - ignored_files_regex: z.array(z.string()).optional().describe("Regex patterns to exclude files from diff results (e.g., 'test/mocks.*', 'go\\.sum')"), + excluded_file_patterns: z.array(z.string()).optional().describe( + "Array of regex patterns to exclude files from the diff results. Each pattern is a JavaScript-compatible regular expression that matches file paths to ignore. Examples: [\"^test/mocks/\", \"\\.spec\\.ts$\", \"package-lock\\.json\"]" + ), }); export const GetMergeRequestSchema = ProjectParamsSchema.extend({