@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,594 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Markdown Serialization Utilities
|
|
3
|
+
*
|
|
4
|
+
* Convert between ADO work items and local markdown files.
|
|
5
|
+
* Uses YAML frontmatter for metadata and markdown sections for content.
|
|
6
|
+
*/
|
|
7
|
+
import { isHtmlContent, getAdditionalFieldConfig, ADDITIONAL_FIELD_DISPLAY_NAMES } from './html-detection.js';
|
|
8
|
+
/**
|
|
9
|
+
* Simple YAML serializer for frontmatter
|
|
10
|
+
* Handles basic types: string, number, boolean, arrays
|
|
11
|
+
*/
|
|
12
|
+
function serializeFrontmatter(data) {
|
|
13
|
+
const lines = ['---'];
|
|
14
|
+
for (const [key, value] of Object.entries(data)) {
|
|
15
|
+
if (value === undefined || value === null)
|
|
16
|
+
continue;
|
|
17
|
+
if (Array.isArray(value)) {
|
|
18
|
+
if (value.length === 0)
|
|
19
|
+
continue;
|
|
20
|
+
lines.push(`${key}:`);
|
|
21
|
+
for (const item of value) {
|
|
22
|
+
lines.push(`- ${item}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
else if (typeof value === 'string') {
|
|
26
|
+
// Quote strings that might be parsed as other types or contain special chars
|
|
27
|
+
if (value.includes(':') || value.includes('#') || value.includes('\n') ||
|
|
28
|
+
value.match(/^[\d.]+$/) || value === 'true' || value === 'false' ||
|
|
29
|
+
value === 'null' || value === '') {
|
|
30
|
+
lines.push(`${key}: "${value.replace(/"/g, '\\"')}"`);
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
lines.push(`${key}: ${value}`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
else if (typeof value === 'number' || typeof value === 'boolean') {
|
|
37
|
+
lines.push(`${key}: ${value}`);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
lines.push('---');
|
|
41
|
+
return lines.join('\n');
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Simple YAML parser for frontmatter
|
|
45
|
+
*/
|
|
46
|
+
function parseFrontmatter(yamlContent) {
|
|
47
|
+
const result = {};
|
|
48
|
+
const lines = yamlContent.split('\n');
|
|
49
|
+
let currentKey = null;
|
|
50
|
+
let currentArray = null;
|
|
51
|
+
for (const line of lines) {
|
|
52
|
+
// Skip empty lines
|
|
53
|
+
if (!line.trim())
|
|
54
|
+
continue;
|
|
55
|
+
// Array item
|
|
56
|
+
if (line.match(/^\s*-\s+/)) {
|
|
57
|
+
if (currentKey && currentArray !== null) {
|
|
58
|
+
const value = line.replace(/^\s*-\s+/, '').trim();
|
|
59
|
+
currentArray.push(parseYamlValue(value));
|
|
60
|
+
}
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
// Key-value pair
|
|
64
|
+
const match = line.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(.*)?$/);
|
|
65
|
+
if (match) {
|
|
66
|
+
// Save previous array if any
|
|
67
|
+
if (currentKey && currentArray !== null) {
|
|
68
|
+
result[currentKey] = currentArray;
|
|
69
|
+
}
|
|
70
|
+
currentKey = match[1];
|
|
71
|
+
const rawValue = match[2]?.trim();
|
|
72
|
+
// Check if this is start of array (no value after colon)
|
|
73
|
+
if (!rawValue) {
|
|
74
|
+
currentArray = [];
|
|
75
|
+
}
|
|
76
|
+
else {
|
|
77
|
+
currentArray = null;
|
|
78
|
+
result[currentKey] = parseYamlValue(rawValue);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Save final array if any
|
|
83
|
+
if (currentKey && currentArray !== null) {
|
|
84
|
+
result[currentKey] = currentArray;
|
|
85
|
+
}
|
|
86
|
+
return result;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Parse a YAML value string to appropriate type
|
|
90
|
+
*/
|
|
91
|
+
function parseYamlValue(value) {
|
|
92
|
+
// Remove quotes
|
|
93
|
+
if ((value.startsWith('"') && value.endsWith('"')) ||
|
|
94
|
+
(value.startsWith("'") && value.endsWith("'"))) {
|
|
95
|
+
return value.slice(1, -1).replace(/\\"/g, '"');
|
|
96
|
+
}
|
|
97
|
+
// Boolean
|
|
98
|
+
if (value === 'true')
|
|
99
|
+
return true;
|
|
100
|
+
if (value === 'false')
|
|
101
|
+
return false;
|
|
102
|
+
// Null
|
|
103
|
+
if (value === 'null' || value === '~')
|
|
104
|
+
return null;
|
|
105
|
+
// Number
|
|
106
|
+
if (value.match(/^-?\d+$/))
|
|
107
|
+
return parseInt(value, 10);
|
|
108
|
+
if (value.match(/^-?\d+\.\d+$/))
|
|
109
|
+
return parseFloat(value);
|
|
110
|
+
return value;
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Convert an ADO work item to markdown file content
|
|
114
|
+
*
|
|
115
|
+
* @param workItem - The work item from ADO API
|
|
116
|
+
* @param revision - The revision number
|
|
117
|
+
* @returns Object with markdown content and list of skipped fields (if any were HTML)
|
|
118
|
+
*/
|
|
119
|
+
export function workItemToMarkdown(workItem, revision) {
|
|
120
|
+
const fields = workItem.fields || {};
|
|
121
|
+
const fieldConfig = getAdditionalFieldConfig();
|
|
122
|
+
const skippedFields = [];
|
|
123
|
+
// Build frontmatter data
|
|
124
|
+
const frontmatter = {
|
|
125
|
+
id: workItem.id,
|
|
126
|
+
title: fields['System.Title'] || '',
|
|
127
|
+
type: fields['System.WorkItemType'] || 'Unknown',
|
|
128
|
+
state: fields['System.State'] || '',
|
|
129
|
+
url: workItem._links?.html?.href || `https://dev.azure.com/_workitems/edit/${workItem.id}`,
|
|
130
|
+
};
|
|
131
|
+
// Optional fields
|
|
132
|
+
if (fields['System.AssignedTo']?.displayName) {
|
|
133
|
+
frontmatter.assignedTo = fields['System.AssignedTo'].displayName;
|
|
134
|
+
}
|
|
135
|
+
if (fields['Microsoft.VSTS.Scheduling.StoryPoints'] !== undefined) {
|
|
136
|
+
frontmatter.storyPoints = fields['Microsoft.VSTS.Scheduling.StoryPoints'];
|
|
137
|
+
}
|
|
138
|
+
if (fields['System.Parent']) {
|
|
139
|
+
frontmatter.parent = fields['System.Parent'];
|
|
140
|
+
}
|
|
141
|
+
// MoSCoW priority (custom field - varies by org)
|
|
142
|
+
const moscowField = fields['Custom.MoSCoW'] || fields['Microsoft.VSTS.Common.Priority'];
|
|
143
|
+
if (moscowField) {
|
|
144
|
+
frontmatter.moscow = moscowField;
|
|
145
|
+
}
|
|
146
|
+
// Tags
|
|
147
|
+
if (fields['System.Tags']) {
|
|
148
|
+
frontmatter.tags = fields['System.Tags'].split(';').map((t) => t.trim()).filter((t) => t);
|
|
149
|
+
}
|
|
150
|
+
if (fields['System.AreaPath']) {
|
|
151
|
+
frontmatter.areaPath = fields['System.AreaPath'];
|
|
152
|
+
}
|
|
153
|
+
if (fields['System.IterationPath']) {
|
|
154
|
+
frontmatter.iterationPath = fields['System.IterationPath'];
|
|
155
|
+
}
|
|
156
|
+
// Sync metadata
|
|
157
|
+
frontmatter.lastSyncedRevision = revision;
|
|
158
|
+
frontmatter.lastSyncedAt = new Date().toISOString();
|
|
159
|
+
// Build content sections
|
|
160
|
+
const description = fields['System.Description'] || '';
|
|
161
|
+
const acceptanceCriteria = fields['Microsoft.VSTS.Common.AcceptanceCriteria'] || '';
|
|
162
|
+
let content = serializeFrontmatter(frontmatter);
|
|
163
|
+
content += '\n\n# Description\n\n';
|
|
164
|
+
content += description.trim() || '_No description provided._';
|
|
165
|
+
content += '\n\n---\n\n# Acceptance Criteria\n\n';
|
|
166
|
+
content += acceptanceCriteria.trim() || '_No acceptance criteria provided._';
|
|
167
|
+
// Add additional fields if present and in markdown format
|
|
168
|
+
const addOptionalSection = (fieldName, displayName, sectionTitle) => {
|
|
169
|
+
const fieldContent = fields[fieldName];
|
|
170
|
+
if (!fieldContent || !fieldContent.trim()) {
|
|
171
|
+
return; // Field not present, skip silently
|
|
172
|
+
}
|
|
173
|
+
if (isHtmlContent(fieldContent)) {
|
|
174
|
+
skippedFields.push(`${displayName} (HTML)`);
|
|
175
|
+
return; // HTML format, skip with warning
|
|
176
|
+
}
|
|
177
|
+
content += `\n\n---\n\n# ${sectionTitle}\n\n`;
|
|
178
|
+
content += fieldContent.trim();
|
|
179
|
+
};
|
|
180
|
+
addOptionalSection(fieldConfig.howToTest, ADDITIONAL_FIELD_DISPLAY_NAMES.howToTest, 'How to Test');
|
|
181
|
+
addOptionalSection(fieldConfig.predeploymentSteps, ADDITIONAL_FIELD_DISPLAY_NAMES.predeploymentSteps, 'Predeployment Steps');
|
|
182
|
+
addOptionalSection(fieldConfig.postdeploymentSteps, ADDITIONAL_FIELD_DISPLAY_NAMES.postdeploymentSteps, 'Postdeployment Steps');
|
|
183
|
+
addOptionalSection(fieldConfig.deploymentInformation, ADDITIONAL_FIELD_DISPLAY_NAMES.deploymentInformation, 'Deployment Information');
|
|
184
|
+
content += '\n';
|
|
185
|
+
return { content, skippedFields };
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Parse a markdown file to extract frontmatter and content sections
|
|
189
|
+
*/
|
|
190
|
+
export function parseWorkItemMarkdown(content) {
|
|
191
|
+
// Extract frontmatter between ---
|
|
192
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
193
|
+
if (!frontmatterMatch) {
|
|
194
|
+
throw new Error('Invalid work item markdown file: missing YAML frontmatter');
|
|
195
|
+
}
|
|
196
|
+
const frontmatterRaw = frontmatterMatch[1];
|
|
197
|
+
const frontmatterData = parseFrontmatter(frontmatterRaw);
|
|
198
|
+
// Validate required fields
|
|
199
|
+
if (!frontmatterData.id || typeof frontmatterData.id !== 'number') {
|
|
200
|
+
throw new Error('Invalid work item markdown file: missing or invalid "id" in frontmatter');
|
|
201
|
+
}
|
|
202
|
+
const frontmatter = {
|
|
203
|
+
id: frontmatterData.id,
|
|
204
|
+
title: frontmatterData.title || '',
|
|
205
|
+
type: frontmatterData.type || 'Unknown',
|
|
206
|
+
state: frontmatterData.state || '',
|
|
207
|
+
url: frontmatterData.url || '',
|
|
208
|
+
assignedTo: frontmatterData.assignedTo,
|
|
209
|
+
storyPoints: frontmatterData.storyPoints,
|
|
210
|
+
parent: frontmatterData.parent,
|
|
211
|
+
moscow: frontmatterData.moscow,
|
|
212
|
+
tags: frontmatterData.tags,
|
|
213
|
+
areaPath: frontmatterData.areaPath,
|
|
214
|
+
iterationPath: frontmatterData.iterationPath,
|
|
215
|
+
lastSyncedRevision: frontmatterData.lastSyncedRevision || 0,
|
|
216
|
+
lastSyncedAt: frontmatterData.lastSyncedAt || '',
|
|
217
|
+
};
|
|
218
|
+
// Extract content after frontmatter
|
|
219
|
+
const contentAfterFrontmatter = content.slice(frontmatterMatch[0].length);
|
|
220
|
+
// Helper to extract a section by heading
|
|
221
|
+
// Looks for # SectionName and captures content until the next # heading or end of file
|
|
222
|
+
const extractSection = (sectionName) => {
|
|
223
|
+
// Match section heading followed by content, stopping at next section divider or heading
|
|
224
|
+
const regex = new RegExp(`#\\s+${escapeRegex(sectionName)}\\s*\\n([\\s\\S]*?)(?=\\n---\\n|\\n#\\s+|$)`, 'i');
|
|
225
|
+
const match = contentAfterFrontmatter.match(regex);
|
|
226
|
+
if (!match)
|
|
227
|
+
return undefined;
|
|
228
|
+
const sectionContent = match[1].trim();
|
|
229
|
+
// Return undefined if it's just the placeholder text
|
|
230
|
+
if (sectionContent === `_No ${sectionName.toLowerCase()} provided._`) {
|
|
231
|
+
return undefined;
|
|
232
|
+
}
|
|
233
|
+
return sectionContent || undefined;
|
|
234
|
+
};
|
|
235
|
+
// Extract primary sections
|
|
236
|
+
let description = extractSection('Description') || '';
|
|
237
|
+
if (description === '_No description provided._') {
|
|
238
|
+
description = '';
|
|
239
|
+
}
|
|
240
|
+
let acceptanceCriteria = extractSection('Acceptance Criteria') || '';
|
|
241
|
+
if (acceptanceCriteria === '_No acceptance criteria provided._') {
|
|
242
|
+
acceptanceCriteria = '';
|
|
243
|
+
}
|
|
244
|
+
// Extract additional fields (optional)
|
|
245
|
+
const additionalFields = {};
|
|
246
|
+
const howToTest = extractSection('How to Test');
|
|
247
|
+
if (howToTest)
|
|
248
|
+
additionalFields.howToTest = howToTest;
|
|
249
|
+
const predeploymentSteps = extractSection('Predeployment Steps');
|
|
250
|
+
if (predeploymentSteps)
|
|
251
|
+
additionalFields.predeploymentSteps = predeploymentSteps;
|
|
252
|
+
const postdeploymentSteps = extractSection('Postdeployment Steps');
|
|
253
|
+
if (postdeploymentSteps)
|
|
254
|
+
additionalFields.postdeploymentSteps = postdeploymentSteps;
|
|
255
|
+
const deploymentInformation = extractSection('Deployment Information');
|
|
256
|
+
if (deploymentInformation)
|
|
257
|
+
additionalFields.deploymentInformation = deploymentInformation;
|
|
258
|
+
return {
|
|
259
|
+
frontmatter,
|
|
260
|
+
description,
|
|
261
|
+
acceptanceCriteria,
|
|
262
|
+
additionalFields,
|
|
263
|
+
rawContent: content,
|
|
264
|
+
};
|
|
265
|
+
}
|
|
266
|
+
/**
|
|
267
|
+
* Escape special regex characters in a string
|
|
268
|
+
*/
|
|
269
|
+
function escapeRegex(str) {
|
|
270
|
+
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Convert ADO comments to a read-only markdown file
|
|
274
|
+
*/
|
|
275
|
+
export function commentsToMarkdown(workItem, comments) {
|
|
276
|
+
const fields = workItem.fields || {};
|
|
277
|
+
const frontmatter = {
|
|
278
|
+
id: workItem.id,
|
|
279
|
+
title: fields['System.Title'] || '',
|
|
280
|
+
commentCount: comments.length,
|
|
281
|
+
lastSyncedAt: new Date().toISOString(),
|
|
282
|
+
};
|
|
283
|
+
let content = serializeFrontmatter(frontmatter);
|
|
284
|
+
content += '\n\n# Comments\n\n';
|
|
285
|
+
content += '> **NOTE**: This file is read-only. Comments cannot be pushed back to ADO.\n\n';
|
|
286
|
+
if (comments.length === 0) {
|
|
287
|
+
content += '_No comments on this work item._\n';
|
|
288
|
+
}
|
|
289
|
+
else {
|
|
290
|
+
// Sort comments by date (oldest first)
|
|
291
|
+
const sortedComments = [...comments].sort((a, b) => {
|
|
292
|
+
const dateA = new Date(a.createdDate || a.publishedDate || 0);
|
|
293
|
+
const dateB = new Date(b.createdDate || b.publishedDate || 0);
|
|
294
|
+
return dateA.getTime() - dateB.getTime();
|
|
295
|
+
});
|
|
296
|
+
sortedComments.forEach((comment, index) => {
|
|
297
|
+
content += '---\n\n';
|
|
298
|
+
content += `## Comment #${index + 1}\n`;
|
|
299
|
+
content += `**Author**: ${comment.createdBy?.displayName || 'Unknown'}\n`;
|
|
300
|
+
content += `**Date**: ${comment.createdDate || comment.publishedDate || 'Unknown'}\n\n`;
|
|
301
|
+
content += `${comment.text || comment.content || ''}\n\n`;
|
|
302
|
+
});
|
|
303
|
+
}
|
|
304
|
+
return content;
|
|
305
|
+
}
|
|
306
|
+
/**
|
|
307
|
+
* Build ADO patch operations from parsed markdown changes
|
|
308
|
+
* Only updates fields that have actually changed
|
|
309
|
+
*/
|
|
310
|
+
export function buildPatchOperations(parsed, currentWorkItem) {
|
|
311
|
+
const operations = [];
|
|
312
|
+
const skippedFields = [];
|
|
313
|
+
const currentFields = currentWorkItem.fields || {};
|
|
314
|
+
const fieldConfig = getAdditionalFieldConfig();
|
|
315
|
+
// Check Title
|
|
316
|
+
const currentTitle = currentFields['System.Title'] || '';
|
|
317
|
+
if (parsed.frontmatter.title !== currentTitle) {
|
|
318
|
+
operations.push({
|
|
319
|
+
op: 'replace',
|
|
320
|
+
path: '/fields/System.Title',
|
|
321
|
+
value: parsed.frontmatter.title,
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
// Check Description (only if not HTML in ADO)
|
|
325
|
+
const currentDescription = currentFields['System.Description'] || '';
|
|
326
|
+
if (isHtmlContent(currentDescription)) {
|
|
327
|
+
skippedFields.push('Description (HTML in ADO)');
|
|
328
|
+
}
|
|
329
|
+
else if (parsed.description !== currentDescription) {
|
|
330
|
+
operations.push({
|
|
331
|
+
op: currentDescription ? 'replace' : 'add',
|
|
332
|
+
path: '/fields/System.Description',
|
|
333
|
+
value: parsed.description,
|
|
334
|
+
});
|
|
335
|
+
}
|
|
336
|
+
// Check Acceptance Criteria (only if not HTML in ADO)
|
|
337
|
+
const currentAC = currentFields['Microsoft.VSTS.Common.AcceptanceCriteria'] || '';
|
|
338
|
+
if (isHtmlContent(currentAC)) {
|
|
339
|
+
skippedFields.push('Acceptance Criteria (HTML in ADO)');
|
|
340
|
+
}
|
|
341
|
+
else if (parsed.acceptanceCriteria !== currentAC) {
|
|
342
|
+
operations.push({
|
|
343
|
+
op: currentAC ? 'replace' : 'add',
|
|
344
|
+
path: '/fields/Microsoft.VSTS.Common.AcceptanceCriteria',
|
|
345
|
+
value: parsed.acceptanceCriteria,
|
|
346
|
+
});
|
|
347
|
+
}
|
|
348
|
+
// Helper to check and add patch operation for additional field
|
|
349
|
+
const checkAdditionalField = (localValue, fieldName, displayName) => {
|
|
350
|
+
const currentValue = currentFields[fieldName] || '';
|
|
351
|
+
// If the field is HTML in ADO, skip it
|
|
352
|
+
if (currentValue && isHtmlContent(currentValue)) {
|
|
353
|
+
skippedFields.push(`${displayName} (HTML in ADO)`);
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
// Compare values (treat undefined as empty string)
|
|
357
|
+
const localContent = localValue || '';
|
|
358
|
+
if (localContent !== currentValue) {
|
|
359
|
+
operations.push({
|
|
360
|
+
op: currentValue ? 'replace' : 'add',
|
|
361
|
+
path: `/fields/${fieldName}`,
|
|
362
|
+
value: localContent,
|
|
363
|
+
});
|
|
364
|
+
}
|
|
365
|
+
};
|
|
366
|
+
// Check additional fields
|
|
367
|
+
checkAdditionalField(parsed.additionalFields.howToTest, fieldConfig.howToTest, ADDITIONAL_FIELD_DISPLAY_NAMES.howToTest);
|
|
368
|
+
checkAdditionalField(parsed.additionalFields.predeploymentSteps, fieldConfig.predeploymentSteps, ADDITIONAL_FIELD_DISPLAY_NAMES.predeploymentSteps);
|
|
369
|
+
checkAdditionalField(parsed.additionalFields.postdeploymentSteps, fieldConfig.postdeploymentSteps, ADDITIONAL_FIELD_DISPLAY_NAMES.postdeploymentSteps);
|
|
370
|
+
checkAdditionalField(parsed.additionalFields.deploymentInformation, fieldConfig.deploymentInformation, ADDITIONAL_FIELD_DISPLAY_NAMES.deploymentInformation);
|
|
371
|
+
return { operations, skippedFields };
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Update the lastSyncedRevision in a markdown file content
|
|
375
|
+
*/
|
|
376
|
+
export function updateSyncRevision(content, newRevision) {
|
|
377
|
+
// Update lastSyncedRevision in frontmatter
|
|
378
|
+
const updatedContent = content.replace(/lastSyncedRevision:\s*\d+/, `lastSyncedRevision: ${newRevision}`);
|
|
379
|
+
// Update lastSyncedAt timestamp
|
|
380
|
+
return updatedContent.replace(/lastSyncedAt:\s*[^\n]+/, `lastSyncedAt: ${new Date().toISOString()}`);
|
|
381
|
+
}
|
|
382
|
+
/**
|
|
383
|
+
* Check if a work item frontmatter indicates a new (not yet created) work item
|
|
384
|
+
* New work items don't have an 'id' field
|
|
385
|
+
*/
|
|
386
|
+
export function isNewWorkItem(frontmatter) {
|
|
387
|
+
return !frontmatter.id || typeof frontmatter.id !== 'number';
|
|
388
|
+
}
|
|
389
|
+
/**
|
|
390
|
+
* Parse a markdown file for a NEW work item (no id required)
|
|
391
|
+
*/
|
|
392
|
+
export function parseNewWorkItemMarkdown(content) {
|
|
393
|
+
// Extract frontmatter between ---
|
|
394
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
395
|
+
if (!frontmatterMatch) {
|
|
396
|
+
throw new Error('Invalid work item markdown file: missing YAML frontmatter');
|
|
397
|
+
}
|
|
398
|
+
const frontmatterRaw = frontmatterMatch[1];
|
|
399
|
+
const frontmatterData = parseFrontmatter(frontmatterRaw);
|
|
400
|
+
// Validate required fields for new work items
|
|
401
|
+
if (!frontmatterData.parent || typeof frontmatterData.parent !== 'number') {
|
|
402
|
+
throw new Error('New work item files require a "parent" field with the parent work item ID');
|
|
403
|
+
}
|
|
404
|
+
if (!frontmatterData.title || typeof frontmatterData.title !== 'string') {
|
|
405
|
+
throw new Error('New work item files require a "title" field');
|
|
406
|
+
}
|
|
407
|
+
const frontmatter = {
|
|
408
|
+
title: frontmatterData.title,
|
|
409
|
+
type: frontmatterData.type || 'User Story',
|
|
410
|
+
state: frontmatterData.state || 'New',
|
|
411
|
+
parent: frontmatterData.parent,
|
|
412
|
+
assignedTo: frontmatterData.assignedTo,
|
|
413
|
+
storyPoints: frontmatterData.storyPoints,
|
|
414
|
+
moscow: frontmatterData.moscow,
|
|
415
|
+
tags: frontmatterData.tags,
|
|
416
|
+
areaPath: frontmatterData.areaPath,
|
|
417
|
+
iterationPath: frontmatterData.iterationPath,
|
|
418
|
+
};
|
|
419
|
+
// Extract content after frontmatter
|
|
420
|
+
const contentAfterFrontmatter = content.slice(frontmatterMatch[0].length);
|
|
421
|
+
// Helper to extract a section by heading (reuse from parseWorkItemMarkdown)
|
|
422
|
+
const extractSection = (sectionName) => {
|
|
423
|
+
const regex = new RegExp(`#\\s+${escapeRegex(sectionName)}\\s*\\n([\\s\\S]*?)(?=\\n---\\n|\\n#\\s+|$)`, 'i');
|
|
424
|
+
const match = contentAfterFrontmatter.match(regex);
|
|
425
|
+
if (!match)
|
|
426
|
+
return undefined;
|
|
427
|
+
const sectionContent = match[1].trim();
|
|
428
|
+
if (sectionContent === `_No ${sectionName.toLowerCase()} provided._`) {
|
|
429
|
+
return undefined;
|
|
430
|
+
}
|
|
431
|
+
return sectionContent || undefined;
|
|
432
|
+
};
|
|
433
|
+
// Extract primary sections
|
|
434
|
+
let description = extractSection('Description') || '';
|
|
435
|
+
if (description === '_No description provided._' || description === '[Your description here]') {
|
|
436
|
+
description = '';
|
|
437
|
+
}
|
|
438
|
+
let acceptanceCriteria = extractSection('Acceptance Criteria') || '';
|
|
439
|
+
if (acceptanceCriteria === '_No acceptance criteria provided._' || acceptanceCriteria === '[Your acceptance criteria here]') {
|
|
440
|
+
acceptanceCriteria = '';
|
|
441
|
+
}
|
|
442
|
+
// Extract additional fields (optional)
|
|
443
|
+
const additionalFields = {};
|
|
444
|
+
const howToTest = extractSection('How to Test');
|
|
445
|
+
if (howToTest)
|
|
446
|
+
additionalFields.howToTest = howToTest;
|
|
447
|
+
const predeploymentSteps = extractSection('Predeployment Steps');
|
|
448
|
+
if (predeploymentSteps)
|
|
449
|
+
additionalFields.predeploymentSteps = predeploymentSteps;
|
|
450
|
+
const postdeploymentSteps = extractSection('Postdeployment Steps');
|
|
451
|
+
if (postdeploymentSteps)
|
|
452
|
+
additionalFields.postdeploymentSteps = postdeploymentSteps;
|
|
453
|
+
const deploymentInformation = extractSection('Deployment Information');
|
|
454
|
+
if (deploymentInformation)
|
|
455
|
+
additionalFields.deploymentInformation = deploymentInformation;
|
|
456
|
+
return {
|
|
457
|
+
frontmatter,
|
|
458
|
+
description,
|
|
459
|
+
acceptanceCriteria,
|
|
460
|
+
additionalFields,
|
|
461
|
+
rawContent: content,
|
|
462
|
+
};
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Build ADO fields object for creating a new work item
|
|
466
|
+
* Inherits areaPath and iterationPath from parent work item
|
|
467
|
+
*/
|
|
468
|
+
export function buildNewWorkItemFields(parsed, parentWorkItem) {
|
|
469
|
+
const parentFields = parentWorkItem.fields || {};
|
|
470
|
+
const fieldConfig = getAdditionalFieldConfig();
|
|
471
|
+
const fields = {
|
|
472
|
+
'System.Title': parsed.frontmatter.title,
|
|
473
|
+
'System.State': parsed.frontmatter.state || 'New',
|
|
474
|
+
};
|
|
475
|
+
// Set description if provided
|
|
476
|
+
if (parsed.description) {
|
|
477
|
+
fields['System.Description'] = parsed.description;
|
|
478
|
+
}
|
|
479
|
+
// Set acceptance criteria if provided
|
|
480
|
+
if (parsed.acceptanceCriteria) {
|
|
481
|
+
fields['Microsoft.VSTS.Common.AcceptanceCriteria'] = parsed.acceptanceCriteria;
|
|
482
|
+
}
|
|
483
|
+
// Story points
|
|
484
|
+
if (parsed.frontmatter.storyPoints !== undefined) {
|
|
485
|
+
fields['Microsoft.VSTS.Scheduling.StoryPoints'] = parsed.frontmatter.storyPoints;
|
|
486
|
+
}
|
|
487
|
+
// MoSCoW (custom field)
|
|
488
|
+
if (parsed.frontmatter.moscow) {
|
|
489
|
+
fields['Custom.MoSCoW'] = parsed.frontmatter.moscow;
|
|
490
|
+
}
|
|
491
|
+
// Tags
|
|
492
|
+
if (parsed.frontmatter.tags && parsed.frontmatter.tags.length > 0) {
|
|
493
|
+
fields['System.Tags'] = parsed.frontmatter.tags.join('; ');
|
|
494
|
+
}
|
|
495
|
+
// Inherit areaPath from parent if not specified
|
|
496
|
+
if (parsed.frontmatter.areaPath) {
|
|
497
|
+
fields['System.AreaPath'] = parsed.frontmatter.areaPath;
|
|
498
|
+
}
|
|
499
|
+
else if (parentFields['System.AreaPath']) {
|
|
500
|
+
fields['System.AreaPath'] = parentFields['System.AreaPath'];
|
|
501
|
+
}
|
|
502
|
+
// Inherit iterationPath from parent if not specified
|
|
503
|
+
if (parsed.frontmatter.iterationPath) {
|
|
504
|
+
fields['System.IterationPath'] = parsed.frontmatter.iterationPath;
|
|
505
|
+
}
|
|
506
|
+
else if (parentFields['System.IterationPath']) {
|
|
507
|
+
fields['System.IterationPath'] = parentFields['System.IterationPath'];
|
|
508
|
+
}
|
|
509
|
+
// Additional fields
|
|
510
|
+
if (parsed.additionalFields.howToTest) {
|
|
511
|
+
fields[fieldConfig.howToTest] = parsed.additionalFields.howToTest;
|
|
512
|
+
}
|
|
513
|
+
if (parsed.additionalFields.predeploymentSteps) {
|
|
514
|
+
fields[fieldConfig.predeploymentSteps] = parsed.additionalFields.predeploymentSteps;
|
|
515
|
+
}
|
|
516
|
+
if (parsed.additionalFields.postdeploymentSteps) {
|
|
517
|
+
fields[fieldConfig.postdeploymentSteps] = parsed.additionalFields.postdeploymentSteps;
|
|
518
|
+
}
|
|
519
|
+
if (parsed.additionalFields.deploymentInformation) {
|
|
520
|
+
fields[fieldConfig.deploymentInformation] = parsed.additionalFields.deploymentInformation;
|
|
521
|
+
}
|
|
522
|
+
return fields;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Generate a new work item template markdown file
|
|
526
|
+
*/
|
|
527
|
+
export function generateNewWorkItemTemplate(parentId, parentTitle, project, workItemType = 'User Story') {
|
|
528
|
+
const frontmatter = {
|
|
529
|
+
title: 'New User Story Title',
|
|
530
|
+
type: workItemType,
|
|
531
|
+
state: 'New',
|
|
532
|
+
parent: parentId,
|
|
533
|
+
assignedTo: '',
|
|
534
|
+
storyPoints: '',
|
|
535
|
+
moscow: '',
|
|
536
|
+
tags: [],
|
|
537
|
+
};
|
|
538
|
+
let content = serializeFrontmatter(frontmatter);
|
|
539
|
+
content += '\n\n';
|
|
540
|
+
content += `> Parent: **#${parentId}** - ${parentTitle}\n`;
|
|
541
|
+
content += `> Project: ${project}\n`;
|
|
542
|
+
content += '\n# Description\n\n';
|
|
543
|
+
content += '[Your description here]\n\n';
|
|
544
|
+
content += '---\n\n';
|
|
545
|
+
content += '# Acceptance Criteria\n\n';
|
|
546
|
+
content += '[Your acceptance criteria here]\n';
|
|
547
|
+
return content;
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* Update a new work item file after creation with the assigned ID
|
|
551
|
+
* Converts it from a "new" file to a synced file with proper frontmatter
|
|
552
|
+
*/
|
|
553
|
+
export function convertNewFileToSynced(content, workItemId, revision, url) {
|
|
554
|
+
// Parse the existing content
|
|
555
|
+
const frontmatterMatch = content.match(/^---\n([\s\S]*?)\n---/);
|
|
556
|
+
if (!frontmatterMatch) {
|
|
557
|
+
throw new Error('Invalid work item markdown file: missing YAML frontmatter');
|
|
558
|
+
}
|
|
559
|
+
const frontmatterRaw = frontmatterMatch[1];
|
|
560
|
+
const frontmatterData = parseFrontmatter(frontmatterRaw);
|
|
561
|
+
const contentAfterFrontmatter = content.slice(frontmatterMatch[0].length);
|
|
562
|
+
// Build new frontmatter with id and sync metadata
|
|
563
|
+
const newFrontmatter = {
|
|
564
|
+
id: workItemId,
|
|
565
|
+
title: frontmatterData.title || '',
|
|
566
|
+
type: frontmatterData.type || 'User Story',
|
|
567
|
+
state: frontmatterData.state || 'New',
|
|
568
|
+
url: url,
|
|
569
|
+
};
|
|
570
|
+
// Copy optional fields
|
|
571
|
+
if (frontmatterData.assignedTo)
|
|
572
|
+
newFrontmatter.assignedTo = frontmatterData.assignedTo;
|
|
573
|
+
if (frontmatterData.storyPoints)
|
|
574
|
+
newFrontmatter.storyPoints = frontmatterData.storyPoints;
|
|
575
|
+
if (frontmatterData.parent)
|
|
576
|
+
newFrontmatter.parent = frontmatterData.parent;
|
|
577
|
+
if (frontmatterData.moscow)
|
|
578
|
+
newFrontmatter.moscow = frontmatterData.moscow;
|
|
579
|
+
if (frontmatterData.tags && frontmatterData.tags.length > 0)
|
|
580
|
+
newFrontmatter.tags = frontmatterData.tags;
|
|
581
|
+
if (frontmatterData.areaPath)
|
|
582
|
+
newFrontmatter.areaPath = frontmatterData.areaPath;
|
|
583
|
+
if (frontmatterData.iterationPath)
|
|
584
|
+
newFrontmatter.iterationPath = frontmatterData.iterationPath;
|
|
585
|
+
// Add sync metadata
|
|
586
|
+
newFrontmatter.lastSyncedRevision = revision;
|
|
587
|
+
newFrontmatter.lastSyncedAt = new Date().toISOString();
|
|
588
|
+
// Remove the "Parent:" and "Project:" note lines from the content
|
|
589
|
+
let cleanedContent = contentAfterFrontmatter
|
|
590
|
+
.replace(/>\s*Parent:.*\n/i, '')
|
|
591
|
+
.replace(/>\s*Project:.*\n/i, '');
|
|
592
|
+
return serializeFrontmatter(newFrontmatter) + cleanedContent;
|
|
593
|
+
}
|
|
594
|
+
//# sourceMappingURL=markdown-serializer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-serializer.js","sourceRoot":"","sources":["../../src/sync/markdown-serializer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,aAAa,EAAE,wBAAwB,EAAE,8BAA8B,EAA8B,MAAM,qBAAqB,CAAC;AAoD1I;;;GAGG;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;QAEpD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC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