@mcp-consultant-tools/azure-devops 27.0.0-beta.1 → 27.0.0-beta.3
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.d.ts.map +1 -1
- package/build/index.js +659 -1
- package/build/index.js.map +1 -1
- package/build/sync/file-utils.d.ts +86 -0
- package/build/sync/file-utils.d.ts.map +1 -0
- package/build/sync/file-utils.js +224 -0
- package/build/sync/file-utils.js.map +1 -0
- package/build/sync/git-utils.d.ts +31 -0
- package/build/sync/git-utils.d.ts.map +1 -0
- package/build/sync/git-utils.js +116 -0
- package/build/sync/git-utils.js.map +1 -0
- package/build/sync/html-detection.d.ts +83 -0
- package/build/sync/html-detection.d.ts.map +1 -0
- package/build/sync/html-detection.js +146 -0
- package/build/sync/html-detection.js.map +1 -0
- package/build/sync/index.d.ts +11 -0
- package/build/sync/index.d.ts.map +1 -0
- package/build/sync/index.js +11 -0
- package/build/sync/index.js.map +1 -0
- package/build/sync/markdown-serializer.d.ts +130 -0
- package/build/sync/markdown-serializer.d.ts.map +1 -0
- package/build/sync/markdown-serializer.js +594 -0
- package/build/sync/markdown-serializer.js.map +1 -0
- package/build/sync/task-serializer.d.ts +92 -0
- package/build/sync/task-serializer.d.ts.map +1 -0
- package/build/sync/task-serializer.js +381 -0
- package/build/sync/task-serializer.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Serialization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Convert between ADO Task work items and local markdown files.
|
|
5
|
+
* Tasks are stored in a single file per parent User Story: {parentId}-tasks.md
|
|
6
|
+
* Supports upsert: update existing tasks or create new ones.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Task field names in ADO API
|
|
10
|
+
*/
|
|
11
|
+
export declare const TASK_FIELDS: {
|
|
12
|
+
readonly title: "System.Title";
|
|
13
|
+
readonly description: "System.Description";
|
|
14
|
+
readonly state: "System.State";
|
|
15
|
+
readonly assignedTo: "System.AssignedTo";
|
|
16
|
+
readonly originalEstimate: "Microsoft.VSTS.Scheduling.OriginalEstimate";
|
|
17
|
+
readonly remainingWork: "Microsoft.VSTS.Scheduling.RemainingWork";
|
|
18
|
+
readonly completedWork: "Microsoft.VSTS.Scheduling.CompletedWork";
|
|
19
|
+
readonly effort: "Microsoft.VSTS.Scheduling.Effort";
|
|
20
|
+
readonly parent: "System.Parent";
|
|
21
|
+
readonly areaPath: "System.AreaPath";
|
|
22
|
+
readonly iterationPath: "System.IterationPath";
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Parsed task from markdown
|
|
26
|
+
*/
|
|
27
|
+
export interface ParsedTask {
|
|
28
|
+
id: number | null;
|
|
29
|
+
title: string;
|
|
30
|
+
state: string;
|
|
31
|
+
assignedTo?: string;
|
|
32
|
+
originalEstimate?: number;
|
|
33
|
+
remainingWork?: number;
|
|
34
|
+
completedWork?: number;
|
|
35
|
+
effort?: number;
|
|
36
|
+
revision?: number;
|
|
37
|
+
description?: string;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Tasks file frontmatter
|
|
41
|
+
*/
|
|
42
|
+
export interface TasksFileFrontmatter {
|
|
43
|
+
parentId: number;
|
|
44
|
+
parentTitle: string;
|
|
45
|
+
project: string;
|
|
46
|
+
lastSyncedAt: string;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Parsed tasks file
|
|
50
|
+
*/
|
|
51
|
+
export interface ParsedTasksFile {
|
|
52
|
+
frontmatter: TasksFileFrontmatter;
|
|
53
|
+
tasks: ParsedTask[];
|
|
54
|
+
rawContent: string;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Convert ADO tasks to markdown file content
|
|
58
|
+
*
|
|
59
|
+
* @param parentWorkItem - The parent work item (User Story)
|
|
60
|
+
* @param tasks - Array of task work items
|
|
61
|
+
* @param project - Project name
|
|
62
|
+
* @returns Markdown content
|
|
63
|
+
*/
|
|
64
|
+
export declare function tasksToMarkdown(parentWorkItem: any, tasks: any[], project: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Parse a tasks markdown file to extract frontmatter and tasks
|
|
67
|
+
*/
|
|
68
|
+
export declare function parseTasksMarkdown(content: string): ParsedTasksFile;
|
|
69
|
+
/**
|
|
70
|
+
* Build patch operations for updating a task in ADO
|
|
71
|
+
*/
|
|
72
|
+
export declare function buildTaskPatchOperations(parsedTask: ParsedTask, currentTask: any): {
|
|
73
|
+
operations: any[];
|
|
74
|
+
fieldsUpdated: string[];
|
|
75
|
+
};
|
|
76
|
+
/**
|
|
77
|
+
* Build fields object for creating a new task in ADO
|
|
78
|
+
*/
|
|
79
|
+
export declare function buildNewTaskFields(parsedTask: ParsedTask, areaPath?: string, iterationPath?: string): Record<string, any>;
|
|
80
|
+
/**
|
|
81
|
+
* Get the file path for a tasks file
|
|
82
|
+
*/
|
|
83
|
+
export declare function getTasksFilePath(folder: string, parentId: number): string;
|
|
84
|
+
/**
|
|
85
|
+
* Update the tasks file after creating new tasks
|
|
86
|
+
* Replaces "## NEW TASK" sections with "## Task #ID" after creation
|
|
87
|
+
*/
|
|
88
|
+
export declare function updateTasksFileAfterCreate(content: string, createdTasks: {
|
|
89
|
+
title: string;
|
|
90
|
+
id: number;
|
|
91
|
+
}[]): string;
|
|
92
|
+
//# sourceMappingURL=task-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-serializer.d.ts","sourceRoot":"","sources":["../../src/sync/task-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAIH;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;CAYd,CAAC;AAEX;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MA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0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,GAC5C,MAAM,CAiCR"}
|
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task Serialization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Convert between ADO Task work items and local markdown files.
|
|
5
|
+
* Tasks are stored in a single file per parent User Story: {parentId}-tasks.md
|
|
6
|
+
* Supports upsert: update existing tasks or create new ones.
|
|
7
|
+
*/
|
|
8
|
+
import { isHtmlContent } from './html-detection.js';
|
|
9
|
+
/**
|
|
10
|
+
* Task field names in ADO API
|
|
11
|
+
*/
|
|
12
|
+
export const TASK_FIELDS = {
|
|
13
|
+
title: 'System.Title',
|
|
14
|
+
description: 'System.Description',
|
|
15
|
+
state: 'System.State',
|
|
16
|
+
assignedTo: 'System.AssignedTo',
|
|
17
|
+
originalEstimate: 'Microsoft.VSTS.Scheduling.OriginalEstimate',
|
|
18
|
+
remainingWork: 'Microsoft.VSTS.Scheduling.RemainingWork',
|
|
19
|
+
completedWork: 'Microsoft.VSTS.Scheduling.CompletedWork',
|
|
20
|
+
effort: 'Microsoft.VSTS.Scheduling.Effort',
|
|
21
|
+
parent: 'System.Parent',
|
|
22
|
+
areaPath: 'System.AreaPath',
|
|
23
|
+
iterationPath: 'System.IterationPath',
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Simple YAML serializer for frontmatter
|
|
27
|
+
*/
|
|
28
|
+
function serializeFrontmatter(data) {
|
|
29
|
+
const lines = ['---'];
|
|
30
|
+
for (const [key, value] of Object.entries(data)) {
|
|
31
|
+
if (value === undefined || value === null)
|
|
32
|
+
continue;
|
|
33
|
+
if (typeof value === 'string') {
|
|
34
|
+
// Quote strings that might be parsed as other types or contain special chars
|
|
35
|
+
if (value.includes(':') || value.includes('#') || value.includes('\n') ||
|
|
36
|
+
value.match(/^[\d.]+$/) || value === 'true' || value === 'false' ||
|
|
37
|
+
value === 'null' || value === '') {
|
|
38
|
+
lines.push(`${key}: "${value.replace(/"/g, '\\"')}"`);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
lines.push(`${key}: ${value}`);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
else if (typeof value === 'number' || typeof value === 'boolean') {
|
|
45
|
+
lines.push(`${key}: ${value}`);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
lines.push('---');
|
|
49
|
+
return lines.join('\n');
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Simple YAML parser for frontmatter
|
|
53
|
+
*/
|
|
54
|
+
function parseFrontmatter(yamlContent) {
|
|
55
|
+
const result = {};
|
|
56
|
+
const lines = yamlContent.split('\n');
|
|
57
|
+
for (const line of lines) {
|
|
58
|
+
if (!line.trim())
|
|
59
|
+
continue;
|
|
60
|
+
const match = line.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(.*)?$/);
|
|
61
|
+
if (match) {
|
|
62
|
+
const key = match[1];
|
|
63
|
+
const rawValue = match[2]?.trim();
|
|
64
|
+
if (rawValue) {
|
|
65
|
+
result[key] = parseYamlValue(rawValue);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return result;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Parse a YAML value string to appropriate type
|
|
73
|
+
*/
|
|
74
|
+
function parseYamlValue(value) {
|
|
75
|
+
// Remove quotes
|
|
76
|
+
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
77
|
+
(value.startsWith("'") && value.endsWith("'"))) {
|
|
78
|
+
return value.slice(1, -1).replace(/\\"/g, '"');
|
|
79
|
+
}
|
|
80
|
+
// Boolean
|
|
81
|
+
if (value === 'true')
|
|
82
|
+
return true;
|
|
83
|
+
if (value === 'false')
|
|
84
|
+
return false;
|
|
85
|
+
// Null
|
|
86
|
+
if (value === 'null' || value === '~')
|
|
87
|
+
return null;
|
|
88
|
+
// Number
|
|
89
|
+
if (value.match(/^-?\d+$/))
|
|
90
|
+
return parseInt(value, 10);
|
|
91
|
+
if (value.match(/^-?\d+\.\d+$/))
|
|
92
|
+
return parseFloat(value);
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Convert ADO tasks to markdown file content
|
|
97
|
+
*
|
|
98
|
+
* @param parentWorkItem - The parent work item (User Story)
|
|
99
|
+
* @param tasks - Array of task work items
|
|
100
|
+
* @param project - Project name
|
|
101
|
+
* @returns Markdown content
|
|
102
|
+
*/
|
|
103
|
+
export function tasksToMarkdown(parentWorkItem, tasks, project) {
|
|
104
|
+
const parentFields = parentWorkItem.fields || {};
|
|
105
|
+
const frontmatter = {
|
|
106
|
+
parentId: parentWorkItem.id,
|
|
107
|
+
parentTitle: parentFields['System.Title'] || '',
|
|
108
|
+
project,
|
|
109
|
+
lastSyncedAt: new Date().toISOString(),
|
|
110
|
+
};
|
|
111
|
+
let content = serializeFrontmatter(frontmatter);
|
|
112
|
+
content += `\n\n# Tasks for User Story #${parentWorkItem.id}\n\n`;
|
|
113
|
+
content += `> **Note**: This file supports upsert - edit existing tasks or add new ones below.\n\n`;
|
|
114
|
+
if (tasks.length === 0) {
|
|
115
|
+
content += `_No tasks found for this User Story._\n\n`;
|
|
116
|
+
content += `---\n\n`;
|
|
117
|
+
content += `## NEW TASK\n`;
|
|
118
|
+
content += `**Title**: \n`;
|
|
119
|
+
content += `**State**: New\n`;
|
|
120
|
+
content += `**Assigned To**: \n`;
|
|
121
|
+
content += `**Original Estimate**: \n`;
|
|
122
|
+
content += `**Remaining Work**: \n`;
|
|
123
|
+
content += `**Completed Work**: 0\n`;
|
|
124
|
+
content += `**Effort**: \n\n`;
|
|
125
|
+
content += `### Description\n\n`;
|
|
126
|
+
content += `_Add task description here_\n`;
|
|
127
|
+
}
|
|
128
|
+
else {
|
|
129
|
+
for (const task of tasks) {
|
|
130
|
+
const fields = task.fields || {};
|
|
131
|
+
const taskId = task.id;
|
|
132
|
+
const revision = task.rev || task._rev || 1;
|
|
133
|
+
content += `---\n\n`;
|
|
134
|
+
content += `## Task #${taskId}\n`;
|
|
135
|
+
content += `**Title**: ${fields['System.Title'] || ''}\n`;
|
|
136
|
+
content += `**State**: ${fields['System.State'] || 'New'}\n`;
|
|
137
|
+
content += `**Assigned To**: ${fields['System.AssignedTo']?.displayName || ''}\n`;
|
|
138
|
+
content += `**Original Estimate**: ${fields['Microsoft.VSTS.Scheduling.OriginalEstimate'] ?? ''}\n`;
|
|
139
|
+
content += `**Remaining Work**: ${fields['Microsoft.VSTS.Scheduling.RemainingWork'] ?? ''}\n`;
|
|
140
|
+
content += `**Completed Work**: ${fields['Microsoft.VSTS.Scheduling.CompletedWork'] ?? ''}\n`;
|
|
141
|
+
content += `**Effort**: ${fields['Microsoft.VSTS.Scheduling.Effort'] ?? ''}\n`;
|
|
142
|
+
content += `**Revision**: ${revision}\n\n`;
|
|
143
|
+
content += `### Description\n\n`;
|
|
144
|
+
const description = fields['System.Description'] || '';
|
|
145
|
+
if (description && !isHtmlContent(description)) {
|
|
146
|
+
content += description.trim();
|
|
147
|
+
}
|
|
148
|
+
else if (description && isHtmlContent(description)) {
|
|
149
|
+
content += `_Description is HTML format - not displayed_`;
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
content += `_No description_`;
|
|
153
|
+
}
|
|
154
|
+
content += `\n\n`;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
return content;
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Parse a tasks markdown file to extract frontmatter and tasks
|
|
161
|
+
*/
|
|
162
|
+
export function parseTasksMarkdown(content) {
|
|
163
|
+
// Extract frontmatter between ---
|
|
164
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
165
|
+
if (!frontmatterMatch) {
|
|
166
|
+
throw new Error('Invalid tasks markdown file: missing YAML frontmatter');
|
|
167
|
+
}
|
|
168
|
+
const frontmatterRaw = frontmatterMatch[1];
|
|
169
|
+
const frontmatterData = parseFrontmatter(frontmatterRaw);
|
|
170
|
+
// Validate required fields
|
|
171
|
+
if (!frontmatterData.parentId || typeof frontmatterData.parentId !== 'number') {
|
|
172
|
+
throw new Error('Invalid tasks markdown file: missing or invalid "parentId" in frontmatter');
|
|
173
|
+
}
|
|
174
|
+
const frontmatter = {
|
|
175
|
+
parentId: frontmatterData.parentId,
|
|
176
|
+
parentTitle: frontmatterData.parentTitle || '',
|
|
177
|
+
project: frontmatterData.project || '',
|
|
178
|
+
lastSyncedAt: frontmatterData.lastSyncedAt || '',
|
|
179
|
+
};
|
|
180
|
+
// Extract content after frontmatter
|
|
181
|
+
const contentAfterFrontmatter = content.slice(frontmatterMatch[0].length);
|
|
182
|
+
// Parse all task sections
|
|
183
|
+
const tasks = [];
|
|
184
|
+
// Match task sections: either ## Task #NNNNN or ## NEW TASK
|
|
185
|
+
const taskSectionRegex = /##\s+(Task\s+#(\d+)|NEW\s+TASK)\s*\n([\s\S]*?)(?=\n---|\n##\s+(?:Task|NEW)|$)/gi;
|
|
186
|
+
let match;
|
|
187
|
+
while ((match = taskSectionRegex.exec(contentAfterFrontmatter)) !== null) {
|
|
188
|
+
const isNewTask = match[1].toUpperCase().startsWith('NEW');
|
|
189
|
+
const taskId = isNewTask ? null : parseInt(match[2], 10);
|
|
190
|
+
const taskContent = match[3];
|
|
191
|
+
const task = parseTaskSection(taskContent, taskId);
|
|
192
|
+
if (task.title) { // Only include tasks with a title
|
|
193
|
+
tasks.push(task);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return {
|
|
197
|
+
frontmatter,
|
|
198
|
+
tasks,
|
|
199
|
+
rawContent: content,
|
|
200
|
+
};
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Parse a single task section
|
|
204
|
+
*/
|
|
205
|
+
function parseTaskSection(content, taskId) {
|
|
206
|
+
const task = {
|
|
207
|
+
id: taskId,
|
|
208
|
+
title: '',
|
|
209
|
+
state: 'New',
|
|
210
|
+
};
|
|
211
|
+
// Extract field values using regex
|
|
212
|
+
const extractField = (fieldName) => {
|
|
213
|
+
const regex = new RegExp(`\\*\\*${fieldName}\\*\\*:\\s*(.*)`, 'i');
|
|
214
|
+
const match = content.match(regex);
|
|
215
|
+
return match ? match[1].trim() : undefined;
|
|
216
|
+
};
|
|
217
|
+
const extractNumericField = (fieldName) => {
|
|
218
|
+
const value = extractField(fieldName);
|
|
219
|
+
if (!value || value === '')
|
|
220
|
+
return undefined;
|
|
221
|
+
const num = parseFloat(value);
|
|
222
|
+
return isNaN(num) ? undefined : num;
|
|
223
|
+
};
|
|
224
|
+
task.title = extractField('Title') || '';
|
|
225
|
+
task.state = extractField('State') || 'New';
|
|
226
|
+
const assignedTo = extractField('Assigned To');
|
|
227
|
+
if (assignedTo)
|
|
228
|
+
task.assignedTo = assignedTo;
|
|
229
|
+
const originalEstimate = extractNumericField('Original Estimate');
|
|
230
|
+
if (originalEstimate !== undefined)
|
|
231
|
+
task.originalEstimate = originalEstimate;
|
|
232
|
+
const remainingWork = extractNumericField('Remaining Work');
|
|
233
|
+
if (remainingWork !== undefined)
|
|
234
|
+
task.remainingWork = remainingWork;
|
|
235
|
+
const completedWork = extractNumericField('Completed Work');
|
|
236
|
+
if (completedWork !== undefined)
|
|
237
|
+
task.completedWork = completedWork;
|
|
238
|
+
const effort = extractNumericField('Effort');
|
|
239
|
+
if (effort !== undefined)
|
|
240
|
+
task.effort = effort;
|
|
241
|
+
const revision = extractNumericField('Revision');
|
|
242
|
+
if (revision !== undefined)
|
|
243
|
+
task.revision = revision;
|
|
244
|
+
// Extract description (content after ### Description)
|
|
245
|
+
const descriptionMatch = content.match(/###\s*Description\s*\n([\s\S]*?)$/i);
|
|
246
|
+
if (descriptionMatch) {
|
|
247
|
+
const desc = descriptionMatch[1].trim();
|
|
248
|
+
if (desc && desc !== '_No description_' && desc !== '_Add task description here_' &&
|
|
249
|
+
!desc.startsWith('_Description is HTML')) {
|
|
250
|
+
task.description = desc;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return task;
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Build patch operations for updating a task in ADO
|
|
257
|
+
*/
|
|
258
|
+
export function buildTaskPatchOperations(parsedTask, currentTask) {
|
|
259
|
+
const operations = [];
|
|
260
|
+
const fieldsUpdated = [];
|
|
261
|
+
const currentFields = currentTask.fields || {};
|
|
262
|
+
// Helper to add operation if value changed
|
|
263
|
+
const addIfChanged = (fieldPath, newValue, fieldName) => {
|
|
264
|
+
const currentValue = currentFields[fieldPath];
|
|
265
|
+
// Handle null/undefined/empty string comparisons
|
|
266
|
+
const normalizedNew = newValue === '' || newValue === undefined ? null : newValue;
|
|
267
|
+
const normalizedCurrent = currentValue === '' || currentValue === undefined ? null : currentValue;
|
|
268
|
+
// For AssignedTo, we only get displayName from the file but ADO stores an object
|
|
269
|
+
if (fieldPath === TASK_FIELDS.assignedTo) {
|
|
270
|
+
// Skip if we can't properly compare (would need email/ID to set)
|
|
271
|
+
return;
|
|
272
|
+
}
|
|
273
|
+
if (normalizedNew !== normalizedCurrent) {
|
|
274
|
+
if (normalizedNew === null) {
|
|
275
|
+
// Remove the field
|
|
276
|
+
operations.push({
|
|
277
|
+
op: 'remove',
|
|
278
|
+
path: `/fields/${fieldPath}`,
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
else {
|
|
282
|
+
operations.push({
|
|
283
|
+
op: currentValue !== undefined && currentValue !== null ? 'replace' : 'add',
|
|
284
|
+
path: `/fields/${fieldPath}`,
|
|
285
|
+
value: newValue,
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
fieldsUpdated.push(fieldName);
|
|
289
|
+
}
|
|
290
|
+
};
|
|
291
|
+
// Check each field
|
|
292
|
+
addIfChanged(TASK_FIELDS.title, parsedTask.title, 'Title');
|
|
293
|
+
addIfChanged(TASK_FIELDS.state, parsedTask.state, 'State');
|
|
294
|
+
addIfChanged(TASK_FIELDS.originalEstimate, parsedTask.originalEstimate, 'OriginalEstimate');
|
|
295
|
+
addIfChanged(TASK_FIELDS.remainingWork, parsedTask.remainingWork, 'RemainingWork');
|
|
296
|
+
addIfChanged(TASK_FIELDS.completedWork, parsedTask.completedWork, 'CompletedWork');
|
|
297
|
+
addIfChanged(TASK_FIELDS.effort, parsedTask.effort, 'Effort');
|
|
298
|
+
// Check description (only if not HTML in ADO)
|
|
299
|
+
const currentDescription = currentFields[TASK_FIELDS.description] || '';
|
|
300
|
+
if (!isHtmlContent(currentDescription)) {
|
|
301
|
+
const newDescription = parsedTask.description || '';
|
|
302
|
+
if (newDescription !== currentDescription) {
|
|
303
|
+
operations.push({
|
|
304
|
+
op: currentDescription ? 'replace' : 'add',
|
|
305
|
+
path: `/fields/${TASK_FIELDS.description}`,
|
|
306
|
+
value: newDescription,
|
|
307
|
+
});
|
|
308
|
+
fieldsUpdated.push('Description');
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
return { operations, fieldsUpdated };
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Build fields object for creating a new task in ADO
|
|
315
|
+
*/
|
|
316
|
+
export function buildNewTaskFields(parsedTask, areaPath, iterationPath) {
|
|
317
|
+
const fields = {
|
|
318
|
+
[TASK_FIELDS.title]: parsedTask.title,
|
|
319
|
+
[TASK_FIELDS.state]: parsedTask.state || 'New',
|
|
320
|
+
};
|
|
321
|
+
if (parsedTask.description) {
|
|
322
|
+
fields[TASK_FIELDS.description] = parsedTask.description;
|
|
323
|
+
}
|
|
324
|
+
if (parsedTask.originalEstimate !== undefined) {
|
|
325
|
+
fields[TASK_FIELDS.originalEstimate] = parsedTask.originalEstimate;
|
|
326
|
+
}
|
|
327
|
+
if (parsedTask.remainingWork !== undefined) {
|
|
328
|
+
fields[TASK_FIELDS.remainingWork] = parsedTask.remainingWork;
|
|
329
|
+
}
|
|
330
|
+
if (parsedTask.completedWork !== undefined) {
|
|
331
|
+
fields[TASK_FIELDS.completedWork] = parsedTask.completedWork;
|
|
332
|
+
}
|
|
333
|
+
if (parsedTask.effort !== undefined) {
|
|
334
|
+
fields[TASK_FIELDS.effort] = parsedTask.effort;
|
|
335
|
+
}
|
|
336
|
+
if (areaPath) {
|
|
337
|
+
fields[TASK_FIELDS.areaPath] = areaPath;
|
|
338
|
+
}
|
|
339
|
+
if (iterationPath) {
|
|
340
|
+
fields[TASK_FIELDS.iterationPath] = iterationPath;
|
|
341
|
+
}
|
|
342
|
+
return fields;
|
|
343
|
+
}
|
|
344
|
+
/**
|
|
345
|
+
* Get the file path for a tasks file
|
|
346
|
+
*/
|
|
347
|
+
export function getTasksFilePath(folder, parentId) {
|
|
348
|
+
return `${folder}/${parentId}-tasks.md`;
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Update the tasks file after creating new tasks
|
|
352
|
+
* Replaces "## NEW TASK" sections with "## Task #ID" after creation
|
|
353
|
+
*/
|
|
354
|
+
export function updateTasksFileAfterCreate(content, createdTasks) {
|
|
355
|
+
let updatedContent = content;
|
|
356
|
+
// Update lastSyncedAt
|
|
357
|
+
updatedContent = updatedContent.replace(/lastSyncedAt:\s*[^\n]+/, `lastSyncedAt: ${new Date().toISOString()}`);
|
|
358
|
+
// Replace each NEW TASK with its actual ID based on title matching
|
|
359
|
+
for (const created of createdTasks) {
|
|
360
|
+
// Find NEW TASK section with matching title
|
|
361
|
+
const newTaskRegex = new RegExp(`(##\\s+NEW\\s+TASK\\s*\\n\\*\\*Title\\*\\*:\\s*${escapeRegex(created.title)}[\\s\\S]*?)(?=\\n---\\n|\\n##\\s+(?:Task|NEW)|$)`, 'i');
|
|
362
|
+
const match = updatedContent.match(newTaskRegex);
|
|
363
|
+
if (match) {
|
|
364
|
+
// Replace the NEW TASK header with Task #ID
|
|
365
|
+
const section = match[1];
|
|
366
|
+
const updatedSection = section
|
|
367
|
+
.replace(/##\s+NEW\s+TASK/i, `## Task #${created.id}`)
|
|
368
|
+
// Add Revision: 1 after the last field before ### Description
|
|
369
|
+
.replace(/(\*\*Effort\*\*:\s*[^\n]*\n)(\n###\s*Description)/i, `$1**Revision**: 1\n$2`);
|
|
370
|
+
updatedContent = updatedContent.replace(section, updatedSection);
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
return updatedContent;
|
|
374
|
+
}
|
|
375
|
+
/**
|
|
376
|
+
* Escape special regex characters
|
|
377
|
+
*/
|
|
378
|
+
function escapeRegex(str) {
|
|
379
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
380
|
+
}
|
|
381
|
+
//# sourceMappingURL=task-serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"task-serializer.js","sourceRoot":"","sources":["../../src/sync/task-serializer.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,KAAK,EAAE,cAAc;IACrB,WAAW,EAAE,oBAAoB;IACjC,KAAK,EAAE,cAAc;IACrB,UAAU,EAAE,mBAAmB;IAC/B,gBAAgB,EAAE,4CAA4C;IAC9D,aAAa,EAAE,yCAAyC;IACxD,aAAa,EAAE,yCAAyC;IACxD,MAAM,EAAE,kCAAkC;IAC1C,MAAM,EAAE,eAAe;IACvB,QAAQ,EAAE,iBAAiB;IAC3B,aAAa,EAAE,sBAAsB;CAC7B,CAAC;AAqCX;;GAEG;AACH,SAAS,oBAAoB,CAAC,IAAyB;IACrD,MAAM,KAAK,GAAa,CAAC,KAAK,CAAC,CAAC;IAEhC,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,IAAI;YAAE,SAAS;QAEp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,CACxC,OAAe,EACf,YAA6C;IAE7C,IAAI,cAAc,GAAG,OAAO,CAAC;IAE7B,sBAAsB;IACtB,cAAc,GAAG,cAAc,CAAC,OAAO,CACrC,wBAAwB,EACxB,iBAAiB,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAC5C,CAAC;IAEF,mEAAmE;IACnE,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;QACnC,4CAA4C;QAC5C,MAAM,YAAY,GAAG,IAAI,MAAM,CAC7B,kDAAkD,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,kDAAkD,EAC9H,GAAG,CACJ,CAAC;QAEF,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;QACjD,IAAI,KAAK,EAAE,CAAC;YACV,4CAA4C;YAC5C,MAAM,OAAO,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;YACzB,MAAM,cAAc,GAAG,OAAO;iBAC3B,OAAO,CAAC,kBAAkB,EAAE,YAAY,OAAO,CAAC,EAAE,EAAE,CAAC;gBACtD,8DAA8D;iBAC7D,OAAO,CACN,oDAAoD,EACpD,uBAAuB,CACxB,CAAC;YACJ,cAAc,GAAG,cAAc,CAAC,OAAO,CAAC,OAAO,EAAE,cAAc,CAAC,CAAC;QACnE,CAAC;IACH,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,GAAW;IAC9B,OAAO,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-consultant-tools/azure-devops",
|
|
3
|
-
"version": "27.0.0-beta.
|
|
3
|
+
"version": "27.0.0-beta.3",
|
|
4
4
|
"description": "MCP server for Azure DevOps integration - wikis, work items, pull requests, and variable group read access",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./build/index.js",
|