azdo-cli 0.5.0-013-comments-markdown.170 → 0.5.0-013-comments-markdown.172
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/dist/index.js +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -264,13 +264,15 @@ async function listWorkItemComments(context, id, pat) {
|
|
|
264
264
|
};
|
|
265
265
|
}
|
|
266
266
|
async function addWorkItemComment(context, id, pat, text, format = "html") {
|
|
267
|
-
const
|
|
267
|
+
const url = buildWorkItemCommentsUrl(context, id);
|
|
268
|
+
url.searchParams.set("format", format);
|
|
269
|
+
const response = await fetchWithErrors(url.toString(), {
|
|
268
270
|
method: "POST",
|
|
269
271
|
headers: {
|
|
270
272
|
...authHeaders(pat),
|
|
271
273
|
"Content-Type": "application/json"
|
|
272
274
|
},
|
|
273
|
-
body: JSON.stringify({ text
|
|
275
|
+
body: JSON.stringify({ text })
|
|
274
276
|
});
|
|
275
277
|
if (response.status === 400) {
|
|
276
278
|
const serverMessage = await readResponseMessage(response) ?? "Unknown error";
|