azdo-cli 0.5.0-013-comments-markdown.170 → 0.5.0-013-comments-markdown.174

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  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 response = await fetchWithErrors(buildWorkItemCommentsUrl(context, id).toString(), {
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, format })
275
+ body: JSON.stringify({ text })
274
276
  });
275
277
  if (response.status === 400) {
276
278
  const serverMessage = await readResponseMessage(response) ?? "Unknown error";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azdo-cli",
3
- "version": "0.5.0-013-comments-markdown.170",
3
+ "version": "0.5.0-013-comments-markdown.174",
4
4
  "description": "Azure DevOps CLI tool",
5
5
  "type": "module",
6
6
  "bin": {