@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.
Files changed (2) hide show
  1. package/dist/index.js +6 -4
  2. 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
- const bug = await zentaoApi.createBug(productId, {
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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzp123/mcp-zentao",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "description": "禅道项目管理系统的高级API集成包,提供任务管理、Bug跟踪等功能的完整封装,专为Cursor IDE设计的MCP扩展",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",