targetprocess-mcp-server 1.0.7 → 1.0.9
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 +10 -7
- package/build/tp.js +7 -2
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -573,10 +573,13 @@ server.registerTool('create_bug', {
|
|
|
573
573
|
inputSchema: {
|
|
574
574
|
title: z.string()
|
|
575
575
|
.describe('Bug card title that summarizes the problem in concise, descriptive, and actionable manner, enabling a developer to understand the issue without opening the report'),
|
|
576
|
-
|
|
577
|
-
.
|
|
578
|
-
|
|
579
|
-
|
|
576
|
+
card: z.object({
|
|
577
|
+
id: z.string()
|
|
578
|
+
.min(5)
|
|
579
|
+
.max(6)
|
|
580
|
+
.describe(`Usually user story id or bug ID (e.g. 145789)`),
|
|
581
|
+
type: z.enum(["UserStory", "Bug"])
|
|
582
|
+
}),
|
|
580
583
|
bugContent: z.string()
|
|
581
584
|
.describe(`Comment content to add, explain what happened in detail.
|
|
582
585
|
Include expected behaviour and what actually occurred.
|
|
@@ -584,13 +587,13 @@ server.registerTool('create_bug', {
|
|
|
584
587
|
Clearly outline the actions needed to trigger the bug.
|
|
585
588
|
Number each step so anyone can follow them easily`),
|
|
586
589
|
},
|
|
587
|
-
}, async ({ title,
|
|
588
|
-
const bugResponse = await tp.
|
|
590
|
+
}, async ({ title, card, bugContent }) => {
|
|
591
|
+
const bugResponse = await tp.createBug({ title, card, bugContent });
|
|
589
592
|
if (!bugResponse) {
|
|
590
593
|
return {
|
|
591
594
|
content: [{
|
|
592
595
|
type: 'text',
|
|
593
|
-
text: `Failed to create
|
|
596
|
+
text: `Failed to create bug "${title}"\n JSON: ${JSON.stringify(bugResponse, null, 2)}`
|
|
594
597
|
}]
|
|
595
598
|
};
|
|
596
599
|
}
|
package/build/tp.js
CHANGED
|
@@ -94,7 +94,7 @@ export class TpClient {
|
|
|
94
94
|
});
|
|
95
95
|
return response;
|
|
96
96
|
}
|
|
97
|
-
async createBug(title, bugContent) {
|
|
97
|
+
async createBug({ title, card, bugContent }) {
|
|
98
98
|
const bug = {
|
|
99
99
|
"Name": title,
|
|
100
100
|
"Project": {
|
|
@@ -112,12 +112,17 @@ export class TpClient {
|
|
|
112
112
|
}],
|
|
113
113
|
"Description": bugContent,
|
|
114
114
|
};
|
|
115
|
+
if (card.type === "UserStory") {
|
|
116
|
+
bug["UserStory"] = {
|
|
117
|
+
"Id": card.id
|
|
118
|
+
};
|
|
119
|
+
}
|
|
115
120
|
return this.post({
|
|
116
121
|
pathParam: { "bugs": '' },
|
|
117
122
|
param: { "format": "json" },
|
|
118
123
|
}, bug);
|
|
119
124
|
}
|
|
120
|
-
async
|
|
125
|
+
async createBugBasedOnUserStory(title, userStoryId, bugContent) {
|
|
121
126
|
const bug = {
|
|
122
127
|
"Name": title,
|
|
123
128
|
"Project": {
|