You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Update work item comment format to default to Markdown (#1155)
This pull request standardizes the handling of the `format` parameter
for work item comments and field values in the Azure DevOps integration.
The default format is now consistently set to `"Markdown"` instead of
`"Html"` across all relevant tools, and the code logic and tests have
been updated to use the correct casing and default values. This ensures
more predictable behavior and aligns the API with user expectations.
## GitHub issue number
#1154
## **Associated Risks**
None
## ✅ **PR Checklist**
- [x] **I have read the [contribution
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CONTRIBUTING.md)**
- [x] **I have read the [code of conduct
guidelines](https://github.com/microsoft/azure-devops-mcp/blob/main/CODE_OF_CONDUCT.md)**
- [x] Title of the pull request is clear and informative.
- [x] 👌 Code hygiene
- [x] 🔭 Telemetry added, updated, or N/A
- [x] 📄 Documentation added, updated, or N/A
- [x] 🛡️ Automated tests added, or N/A
## 🧪 **How did you test it?**
manual testing. updated automated tests to account for empty
project: z.string().optional().describe("The name or ID of the Azure DevOps project. Reuse from prior context if already known. If not provided, a project selection prompt will be shown."),
357
357
workItemId: z.coerce.number().min(1).describe("The ID of the work item to add a comment to."),
358
358
comment: z.string().describe("The text of the comment to add to the work item."),
format: z.enum(["Markdown","Html"]).optional().default("Markdown").describe("The format of the comment text, e.g., 'Markdown', 'Html'. Optional, defaults to 'Markdown'."),
360
360
},
361
361
async({ project, workItemId, comment, format })=>{
format: z.enum(["Markdown","Html"]).optional().default("Markdown").describe("The format of the comment text, e.g., 'Markdown', 'Html'. Optional, defaults to 'Markdown'."),
421
421
},
422
422
async({ project, workItemId, commentId, text, format })=>{
title: z.string().describe("The title of the child work item."),
549
549
description: z.string().describe("The description of the child work item."),
550
-
format: z.enum(["Markdown","Html"]).default("Html").describe("Format for the description on the child work item, e.g., 'Markdown', 'Html'. Defaults to 'Html'."),
550
+
format: z.enum(["Markdown","Html"]).default("Markdown").describe("Format for the description on the child work item, e.g., 'Markdown', 'Html'. Defaults to 'Markdown'."),
551
551
areaPath: z.string().optional().describe("Optional area path for the child work item."),
552
552
iterationPath: z.string().optional().describe("Optional iteration path for the child work item."),
name: z.string().describe("The name of the field, e.g., 'System.Title'."),
879
879
value: z.string().describe("The value of the field."),
880
-
format: z.enum(["Html","Markdown"]).optional().describe("the format of the field value, e.g., 'Html', 'Markdown'. Optional, defaults to 'Html'."),
880
+
format: z.enum(["Html","Markdown"]).optional().default("Markdown").describe("the format of the field value, e.g., 'Html', 'Markdown'. Optional, defaults to 'Markdown'."),
881
881
})
882
882
)
883
883
.describe("A record of field names and values to set on the new work item. Each fild is the field name and each value is the corresponding value to set for that field."),
id: z.coerce.number().min(1).describe("The ID of the work item to update."),
1028
1028
path: z.string().describe("The path of the field to update, e.g., '/fields/System.Title'."),
1029
1029
value: z.string().describe("The new value for the field. This is required for 'add' and 'replace' operations, and should be omitted for 'remove' operations."),
1030
-
format: z.enum(["Html","Markdown"]).optional().describe("The format of the field value. Only to be used for large text fields. e.g., 'Html', 'Markdown'. Optional, defaults to 'Html'."),
1030
+
format: z
1031
+
.enum(["Html","Markdown"])
1032
+
.optional()
1033
+
.default("Markdown")
1034
+
.describe("The format of the field value. Only to be used for large text fields. e.g., 'Html', 'Markdown'. Optional, defaults to 'Markdown'."),
1031
1035
})
1032
1036
)
1033
1037
.describe("An array of updates to apply to work items. Each update should include the operation (op), work item ID (id), field path (path), and new value (value)."),
0 commit comments