@zereight/mcp-gitlab 1.0.74 → 1.0.75
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 +13 -6
- package/build/schemas.js +2 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -320,7 +320,7 @@ const allTools = [
|
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
name: "list_issues",
|
|
323
|
-
description: "List issues
|
|
323
|
+
description: "List issues (default: created by current user only; use scope='all' for all accessible issues)",
|
|
324
324
|
inputSchema: zodToJsonSchema(ListIssuesSchema),
|
|
325
325
|
},
|
|
326
326
|
{
|
|
@@ -823,17 +823,23 @@ async function createIssue(projectId, options) {
|
|
|
823
823
|
return GitLabIssueSchema.parse(data);
|
|
824
824
|
}
|
|
825
825
|
/**
|
|
826
|
-
* List issues
|
|
826
|
+
* List issues across all accessible projects or within a specific project
|
|
827
827
|
* 프로젝트의 이슈 목록 조회
|
|
828
828
|
*
|
|
829
|
-
* @param {string} projectId - The ID or URL-encoded path of the project
|
|
829
|
+
* @param {string} projectId - The ID or URL-encoded path of the project (optional)
|
|
830
830
|
* @param {Object} options - Options for listing issues
|
|
831
831
|
* @returns {Promise<GitLabIssue[]>} List of issues
|
|
832
832
|
*/
|
|
833
833
|
async function listIssues(projectId, options = {}) {
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
834
|
+
let url;
|
|
835
|
+
if (projectId) {
|
|
836
|
+
projectId = decodeURIComponent(projectId); // Decode project ID
|
|
837
|
+
const effectiveProjectId = getEffectiveProjectId(projectId);
|
|
838
|
+
url = new URL(`${GITLAB_API_URL}/projects/${encodeURIComponent(effectiveProjectId)}/issues`);
|
|
839
|
+
}
|
|
840
|
+
else {
|
|
841
|
+
url = new URL(`${GITLAB_API_URL}/issues`);
|
|
842
|
+
}
|
|
837
843
|
// Add all query parameters
|
|
838
844
|
Object.entries(options).forEach(([key, value]) => {
|
|
839
845
|
if (value !== undefined) {
|
|
@@ -1053,6 +1059,7 @@ async function createMergeRequest(projectId, options) {
|
|
|
1053
1059
|
description: options.description,
|
|
1054
1060
|
source_branch: options.source_branch,
|
|
1055
1061
|
target_branch: options.target_branch,
|
|
1062
|
+
target_project_id: options.target_project_id,
|
|
1056
1063
|
assignee_ids: options.assignee_ids,
|
|
1057
1064
|
reviewer_ids: options.reviewer_ids,
|
|
1058
1065
|
labels: options.labels?.join(","),
|
package/build/schemas.js
CHANGED
|
@@ -752,6 +752,7 @@ const MergeRequestOptionsSchema = {
|
|
|
752
752
|
description: z.string().optional().describe("Merge request description"),
|
|
753
753
|
source_branch: z.string().describe("Branch containing changes"),
|
|
754
754
|
target_branch: z.string().describe("Branch to merge into"),
|
|
755
|
+
target_project_id: z.coerce.string().optional().describe("Numeric ID of the target project."),
|
|
755
756
|
assignee_ids: z
|
|
756
757
|
.array(z.number())
|
|
757
758
|
.optional()
|
|
@@ -831,7 +832,7 @@ export const CreateNoteSchema = z.object({
|
|
|
831
832
|
});
|
|
832
833
|
// Issues API operation schemas
|
|
833
834
|
export const ListIssuesSchema = z.object({
|
|
834
|
-
project_id: z.coerce.string().describe("Project ID or URL-encoded path"),
|
|
835
|
+
project_id: z.coerce.string().optional().describe("Project ID or URL-encoded path (optional - if not provided, lists issues across all accessible projects)"),
|
|
835
836
|
assignee_id: z.coerce.string().optional().describe("Return issues assigned to the given user ID. user id or none or any"),
|
|
836
837
|
assignee_username: z.array(z.string()).optional().describe("Return issues assigned to the given username"),
|
|
837
838
|
author_id: z.coerce.string().optional().describe("Return issues created by the given user ID"),
|