targetprocess-mcp-server 1.0.16 → 1.0.17
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 +23 -16
- package/build/tp.js +2 -6
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -767,26 +767,33 @@ server.registerTool('get_not_covered_user_stories_in_feature', {
|
|
|
767
767
|
};
|
|
768
768
|
}
|
|
769
769
|
let userStories = [];
|
|
770
|
-
|
|
771
|
-
const
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
770
|
+
try {
|
|
771
|
+
for (const userStory of userStoriesResults) {
|
|
772
|
+
const covered = userStory.CustomFields.find((field) => field.Name === "Test Automation")?.Value === "Done";
|
|
773
|
+
userStories.push({
|
|
774
|
+
id: userStory.Id,
|
|
775
|
+
name: userStory.Name,
|
|
776
|
+
description: userStory.Description,
|
|
777
|
+
featureId: userStory.Feature.Id,
|
|
778
|
+
featureName: userStory.Feature.Name,
|
|
779
|
+
covered,
|
|
780
|
+
});
|
|
781
|
+
}
|
|
782
|
+
if (userStories.length === 0) {
|
|
783
|
+
return {
|
|
784
|
+
content: [{
|
|
785
|
+
type: 'text',
|
|
786
|
+
text: `No user stories unable to convert to TP card found for feature id: ${id}`,
|
|
787
|
+
}],
|
|
788
|
+
};
|
|
789
|
+
}
|
|
784
790
|
}
|
|
785
|
-
|
|
791
|
+
catch (error) {
|
|
792
|
+
console.error("Error getting user stories:", error);
|
|
786
793
|
return {
|
|
787
794
|
content: [{
|
|
788
795
|
type: 'text',
|
|
789
|
-
text: `
|
|
796
|
+
text: `Failed to get user stories array for feature id: ${id}`,
|
|
790
797
|
}],
|
|
791
798
|
};
|
|
792
799
|
}
|
package/build/tp.js
CHANGED
|
@@ -80,12 +80,8 @@ export class TpClient {
|
|
|
80
80
|
}
|
|
81
81
|
async getUserStory(userStoryId) {
|
|
82
82
|
const response = await this.get({
|
|
83
|
-
pathParam: {
|
|
84
|
-
|
|
85
|
-
},
|
|
86
|
-
param: {
|
|
87
|
-
"format": "json",
|
|
88
|
-
},
|
|
83
|
+
pathParam: { "userStories": userStoryId },
|
|
84
|
+
param: { "format": "json" },
|
|
89
85
|
});
|
|
90
86
|
return response;
|
|
91
87
|
}
|