Skip to content

Commit 5a40e4a

Browse files
author
Maxim Titovich
committed
chore: Bump version to 1.0.6 and clean up code formatting
- Update package version to 1.0.6 - Refactor code in `azure-devops-service.ts` for improved readability by removing unnecessary whitespace - Minor formatting adjustments in `types.ts` for consistency
1 parent 9f8443f commit 5a40e4a

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cursor-azure-devops-mcp",
3-
"version": "1.0.5",
3+
"version": "1.0.6",
44
"description": "MCP Server for Cursor IDE-Azure DevOps Integration",
55
"main": "build/index.js",
66
"type": "module",

src/azure-devops-service.ts

+12-11
Original file line numberDiff line numberDiff line change
@@ -325,17 +325,18 @@ class AzureDevOpsService {
325325

326326
// Filter for work item link relations (exclude attachments and hyperlinks)
327327
const linkRelations = workItem.relations.filter(
328-
(relation: any) => relation.rel.includes('Link') &&
328+
(relation: any) =>
329+
relation.rel.includes('Link') &&
329330
relation.rel !== 'AttachedFile' &&
330331
relation.rel !== 'Hyperlink'
331332
);
332333

333334
// Group relations by relationship type
334335
const groupedRelations: Record<string, WorkItemLink[]> = {};
335-
336+
336337
linkRelations.forEach((relation: any) => {
337338
const relType = relation.rel;
338-
339+
339340
// Extract work item ID from URL
340341
// URL format is typically like: https://dev.azure.com/{org}/{project}/_apis/wit/workItems/{id}
341342
let targetId = 0;
@@ -345,17 +346,17 @@ class AzureDevOpsService {
345346
} catch (error) {
346347
console.error('Failed to extract work item ID from URL:', relation.url);
347348
}
348-
349+
349350
if (!groupedRelations[relType]) {
350351
groupedRelations[relType] = [];
351352
}
352-
353+
353354
const workItemLink: WorkItemLink = {
354355
...relation,
355356
targetId,
356-
title: relation.attributes?.name || `Work Item ${targetId}`
357+
title: relation.attributes?.name || `Work Item ${targetId}`,
357358
};
358-
359+
359360
groupedRelations[relType].push(workItemLink);
360361
});
361362

@@ -376,23 +377,23 @@ class AzureDevOpsService {
376377

377378
// First get all links
378379
const linkGroups = await this.getWorkItemLinks(workItemId);
379-
380+
380381
// Extract all target IDs from all link groups
381382
const linkedIds: number[] = [];
382-
383+
383384
Object.values(linkGroups).forEach(links => {
384385
links.forEach(link => {
385386
if (link.targetId > 0) {
386387
linkedIds.push(link.targetId);
387388
}
388389
});
389390
});
390-
391+
391392
// If no linked items found, return empty array
392393
if (linkedIds.length === 0) {
393394
return [];
394395
}
395-
396+
396397
// Get the full work item details for all linked items
397398
const linkedWorkItems = await this.getWorkItems(linkedIds);
398399
return linkedWorkItems;

src/types.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export interface WorkItemRelation {
3333
// Azure DevOps Work Item Link (Extended from WorkItemRelation)
3434
export interface WorkItemLink extends WorkItemRelation {
3535
targetId: number; // The ID of the target work item
36-
title?: string; // Optional title of the target work item
36+
title?: string; // Optional title of the target work item
3737
}
3838

3939
// Azure DevOps Git Repository

0 commit comments

Comments
 (0)