@zzp123/mcp-zentao 1.3.1 → 1.3.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/api/zentaoApi.d.ts +1 -2
- package/dist/api/zentaoApi.js +0 -17
- package/dist/index.js +0 -17
- package/dist/types/zentao.d.ts +0 -6
- package/package.json +1 -1
package/dist/api/zentaoApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AssignFeedbackRequest, Bug,
|
|
1
|
+
import { AssignFeedbackRequest, Bug, BugStatus, Build, CloseFeedbackRequest, CreateBuildRequest, CreateBugRequest, CreateExecutionRequest, CreateFeedbackRequest, CreatePlanRequest, CreateProductRequest, CreateProgramRequest, CreateProjectRequest, CreateStoryRequest, CreateTaskRequest, CreateTestCaseRequest, CreateTicketRequest, CreateUserRequest, Execution, Feedback, FileUploadResponse, Module, ModuleType, Plan, Product, Program, Project, Release, Story, Task, TaskStatus, TaskUpdate, TestCase, Ticket, UpdateBuildRequest, UpdateBugRequest, UpdateExecutionRequest, UpdateFeedbackRequest, UpdatePlanRequest, UpdateProductRequest, UpdateProgramRequest, UpdateProjectRequest, UpdateStoryRequest, UpdateTestCaseRequest, UpdateTicketRequest, UpdateUserRequest, UploadFileRequest, UserDetail, ZentaoConfig } from '../types/zentao';
|
|
2
2
|
export declare class ZentaoAPI {
|
|
3
3
|
private config;
|
|
4
4
|
private client;
|
|
@@ -13,7 +13,6 @@ export declare class ZentaoAPI {
|
|
|
13
13
|
getBugDetail(bugId: number): Promise<Bug>;
|
|
14
14
|
updateTask(taskId: number, update: TaskUpdate): Promise<Task>;
|
|
15
15
|
finishTask(taskId: number, update?: TaskUpdate): Promise<Task>;
|
|
16
|
-
resolveBug(bugId: number, resolution: BugResolution): Promise<Bug>;
|
|
17
16
|
createTask(task: CreateTaskRequest): Promise<Task>;
|
|
18
17
|
getPrograms(order?: string): Promise<Program[]>;
|
|
19
18
|
getProductPlans(productId: number, branch?: number, begin?: string, end?: string, status?: string, parent?: number): Promise<Plan[]>;
|
package/dist/api/zentaoApi.js
CHANGED
|
@@ -188,23 +188,6 @@ export class ZentaoAPI {
|
|
|
188
188
|
throw error;
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
|
-
async resolveBug(bugId, resolution) {
|
|
192
|
-
try {
|
|
193
|
-
console.log(`正在解决Bug ${bugId}...`);
|
|
194
|
-
const response = await this.request('PUT', `/bugs/${bugId}`, undefined, {
|
|
195
|
-
status: 'resolved',
|
|
196
|
-
assignedTo: this.config.username,
|
|
197
|
-
...resolution,
|
|
198
|
-
resolvedDate: new Date().toISOString(),
|
|
199
|
-
});
|
|
200
|
-
console.log('Bug解决响应:', response);
|
|
201
|
-
return response;
|
|
202
|
-
}
|
|
203
|
-
catch (error) {
|
|
204
|
-
console.error('解决Bug失败:', error);
|
|
205
|
-
throw error;
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
191
|
async createTask(task) {
|
|
209
192
|
try {
|
|
210
193
|
console.log('正在创建新任务...');
|
package/dist/index.js
CHANGED
|
@@ -143,23 +143,6 @@ server.tool("finishTask", {
|
|
|
143
143
|
content: [{ type: "text", text: JSON.stringify(task, null, 2) }]
|
|
144
144
|
};
|
|
145
145
|
});
|
|
146
|
-
// Add resolveBug tool
|
|
147
|
-
server.tool("resolveBug", {
|
|
148
|
-
bugId: z.number(),
|
|
149
|
-
resolution: z.object({
|
|
150
|
-
resolution: z.enum(['fixed', 'notrepro', 'duplicate', 'bydesign', 'willnotfix', 'tostory', 'external']),
|
|
151
|
-
resolvedBuild: z.string().optional(),
|
|
152
|
-
duplicateBug: z.number().optional(),
|
|
153
|
-
comment: z.string().optional()
|
|
154
|
-
})
|
|
155
|
-
}, async ({ bugId, resolution }) => {
|
|
156
|
-
if (!zentaoApi)
|
|
157
|
-
throw new Error("Please initialize Zentao API first");
|
|
158
|
-
const bug = await zentaoApi.resolveBug(bugId, resolution);
|
|
159
|
-
return {
|
|
160
|
-
content: [{ type: "text", text: JSON.stringify(bug, null, 2) }]
|
|
161
|
-
};
|
|
162
|
-
});
|
|
163
146
|
// Add getPrograms tool
|
|
164
147
|
server.tool("getPrograms", {
|
|
165
148
|
order: z.string().optional()
|
package/dist/types/zentao.d.ts
CHANGED
|
@@ -48,12 +48,6 @@ export interface TaskUpdate {
|
|
|
48
48
|
finishedDate?: string;
|
|
49
49
|
comment?: string;
|
|
50
50
|
}
|
|
51
|
-
export interface BugResolution {
|
|
52
|
-
resolution: 'fixed' | 'notrepro' | 'duplicate' | 'bydesign' | 'willnotfix' | 'tostory' | 'external';
|
|
53
|
-
resolvedBuild?: string;
|
|
54
|
-
duplicateBug?: number;
|
|
55
|
-
comment?: string;
|
|
56
|
-
}
|
|
57
51
|
export type TaskStatus = 'wait' | 'doing' | 'done' | 'all';
|
|
58
52
|
export type BugStatus = 'active' | 'resolved' | 'closed' | 'all';
|
|
59
53
|
export interface User {
|