targetprocess-mcp-server 1.0.7 → 1.0.8
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 +5 -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,12 +94,15 @@ 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": {
|
|
101
101
|
"Id": 59901
|
|
102
102
|
},
|
|
103
|
+
[card.type]: {
|
|
104
|
+
"Id": card.id
|
|
105
|
+
},
|
|
103
106
|
"customFields": [{
|
|
104
107
|
"name": "Origin",
|
|
105
108
|
"type": "DropDown",
|
|
@@ -117,7 +120,7 @@ export class TpClient {
|
|
|
117
120
|
param: { "format": "json" },
|
|
118
121
|
}, bug);
|
|
119
122
|
}
|
|
120
|
-
async
|
|
123
|
+
async createBugBasedOnUserStory(title, userStoryId, bugContent) {
|
|
121
124
|
const bug = {
|
|
122
125
|
"Name": title,
|
|
123
126
|
"Project": {
|