@zzp123/mcp-zentao 1.1.1 → 1.1.2
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/dist/index.js +6 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -380,11 +380,12 @@ server.tool("createBug", {
|
|
|
380
380
|
task: z.number().optional(),
|
|
381
381
|
story: z.number().optional(),
|
|
382
382
|
deadline: z.string().optional(),
|
|
383
|
-
openedBuild: z.array(z.string()).optional()
|
|
383
|
+
openedBuild: z.array(z.string()).optional().default(["trunk"])
|
|
384
384
|
}, async ({ productId, title, severity, pri, type, branch, module, execution, keywords, os, browser, steps, task, story, deadline, openedBuild }) => {
|
|
385
385
|
if (!zentaoApi)
|
|
386
386
|
throw new Error("Please initialize Zentao API first");
|
|
387
|
-
|
|
387
|
+
// 如果未提供 openedBuild,使用默认值 ["trunk"] 表示主干版本
|
|
388
|
+
const bugData = {
|
|
388
389
|
title,
|
|
389
390
|
severity,
|
|
390
391
|
pri,
|
|
@@ -399,8 +400,9 @@ server.tool("createBug", {
|
|
|
399
400
|
task,
|
|
400
401
|
story,
|
|
401
402
|
deadline,
|
|
402
|
-
openedBuild
|
|
403
|
-
}
|
|
403
|
+
openedBuild: openedBuild || ["trunk"]
|
|
404
|
+
};
|
|
405
|
+
const bug = await zentaoApi.createBug(productId, bugData);
|
|
404
406
|
return {
|
|
405
407
|
content: [{ type: "text", text: JSON.stringify(bug, null, 2) }]
|
|
406
408
|
};
|