@zereight/mcp-gitlab 1.0.58 → 1.0.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -695,14 +695,20 @@ async function listIssues(projectId, options = {}) {
695
695
  // Add all query parameters
696
696
  Object.entries(options).forEach(([key, value]) => {
697
697
  if (value !== undefined) {
698
- if (key === "labels" && Array.isArray(value)) {
699
- // Handle array of labels
700
- value.forEach(label => {
701
- url.searchParams.append("labels[]", label.toString());
702
- });
698
+ const keys = ["labels", "assignee_username"];
699
+ if (keys.includes(key)) {
700
+ if (Array.isArray(value)) {
701
+ // Handle array of labels
702
+ value.forEach(label => {
703
+ url.searchParams.append(`${key}[]`, label.toString());
704
+ });
705
+ }
706
+ else {
707
+ url.searchParams.append(`${key}[]`, value.toString());
708
+ }
703
709
  }
704
710
  else {
705
- url.searchParams.append("labels[]", value.toString());
711
+ url.searchParams.append(key, value.toString());
706
712
  }
707
713
  }
708
714
  });
@@ -910,6 +916,8 @@ async function createMergeRequest(projectId, options) {
910
916
  labels: options.labels?.join(","),
911
917
  allow_collaboration: options.allow_collaboration,
912
918
  draft: options.draft,
919
+ remove_source_branch: options.remove_source_branch,
920
+ squash: options.squash,
913
921
  }),
914
922
  });
915
923
  if (response.status === 400) {
package/build/schemas.js CHANGED
@@ -194,7 +194,7 @@ export const GitLabUsersResponseSchema = z.record(z.string(), z.object({
194
194
  id: z.number(),
195
195
  username: z.string(),
196
196
  name: z.string(),
197
- avatar_url: z.string(),
197
+ avatar_url: z.string().nullable(),
198
198
  web_url: z.string(),
199
199
  }).nullable());
200
200
  // Namespace related schemas
@@ -230,7 +230,7 @@ export const GitLabNamespaceExistsResponseSchema = z.object({
230
230
  export const GitLabOwnerSchema = z.object({
231
231
  username: z.string(), // Changed from login to match GitLab API
232
232
  id: z.number(),
233
- avatar_url: z.string(),
233
+ avatar_url: z.string().nullable(),
234
234
  web_url: z.string(), // Changed from html_url to match GitLab API
235
235
  name: z.string(), // Added as GitLab includes full name
236
236
  state: z.string(), // Added as GitLab includes user state
@@ -427,6 +427,8 @@ export const CreateMergeRequestOptionsSchema = z.object({
427
427
  labels: z.array(z.string()).optional(),
428
428
  allow_collaboration: z.boolean().optional(), // Changed from maintainer_can_modify to match GitLab API
429
429
  draft: z.boolean().optional(),
430
+ remove_source_branch: z.boolean().optional().describe("Flag indicating if a merge request should remove the source branch when merging."),
431
+ squash: z.boolean().optional().describe("If true, squash all commits into a single commit on merge.")
430
432
  });
431
433
  export const GitLabDiffSchema = z.object({
432
434
  old_path: z.string(),
@@ -543,7 +545,7 @@ export const GitLabForkParentSchema = z.object({
543
545
  .object({
544
546
  username: z.string(), // Changed from login to match GitLab API
545
547
  id: z.number(),
546
- avatar_url: z.string(),
548
+ avatar_url: z.string().nullable(),
547
549
  })
548
550
  .optional(), // Made optional to handle cases where GitLab API doesn't include it
549
551
  web_url: z.string(), // Changed from html_url to match GitLab API
@@ -826,7 +828,7 @@ export const CreateNoteSchema = z.object({
826
828
  export const ListIssuesSchema = z.object({
827
829
  project_id: z.string().describe("Project ID or URL-encoded path"),
828
830
  assignee_id: z.number().optional().describe("Return issues assigned to the given user ID"),
829
- assignee_username: z.string().optional().describe("Return issues assigned to the given username"),
831
+ assignee_username: z.array(z.string()).optional().describe("Return issues assigned to the given username"),
830
832
  author_id: z.number().optional().describe("Return issues created by the given user ID"),
831
833
  author_username: z.string().optional().describe("Return issues created by the given username"),
832
834
  confidential: z.boolean().optional().describe("Filter confidential or public issues"),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zereight/mcp-gitlab",
3
- "version": "1.0.58",
3
+ "version": "1.0.60",
4
4
  "description": "MCP server for using the GitLab API",
5
5
  "license": "MIT",
6
6
  "author": "zereight",
@@ -21,6 +21,7 @@
21
21
  "watch": "tsc --watch",
22
22
  "deploy": "npm publish --access public",
23
23
  "generate-tools": "npx ts-node scripts/generate-tools-readme.ts",
24
+ "changelog": "auto-changelog -p",
24
25
  "test": "node test/validate-api.js",
25
26
  "test:integration": "node test/validate-api.js",
26
27
  "lint": "eslint . --ext .ts",
@@ -48,6 +49,7 @@
48
49
  "prettier": "^3.4.2",
49
50
  "ts-node": "^10.9.2",
50
51
  "typescript": "^5.8.2",
51
- "zod": "^3.24.2"
52
+ "zod": "^3.24.2",
53
+ "auto-changelog": "^2.4.0"
52
54
  }
53
55
  }