azdo-cli 0.10.0-develop.490 → 0.10.0-develop.502

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/README.md CHANGED
@@ -54,7 +54,7 @@ azdo comments list 12345
54
54
  azdo comments add 12345 "Investigating the root cause now."
55
55
 
56
56
  # PR comment threads — list, filter, target by number, resolve or reopen
57
- azdo pr comments # active-branch PR
57
+ azdo pr comments # active-branch PR; code-anchored threads show file:line
58
58
  azdo pr comments --pr-number 64 # any PR by number (skips branch lookup)
59
59
  azdo pr comments --pr-number 64 --hide-resolved # or --exclude-resolved (alias)
60
60
  azdo pr comments --code-related-only # only file/line-anchored threads
package/dist/index.js CHANGED
@@ -3034,18 +3034,22 @@ function mapThread(thread) {
3034
3034
  if (comments.length === 0) {
3035
3035
  return null;
3036
3036
  }
3037
+ const line = thread.threadContext?.rightFileStart?.line ?? thread.threadContext?.leftFileStart?.line ?? null;
3037
3038
  return {
3038
3039
  id: thread.id,
3039
3040
  status: thread.status ?? "unknown",
3040
3041
  threadContext: thread.threadContext?.filePath ?? null,
3042
+ line,
3041
3043
  comments
3042
3044
  };
3043
3045
  }
3044
3046
  function toActiveCommentThread(thread) {
3047
+ const line = thread.threadContext?.rightFileStart?.line ?? thread.threadContext?.leftFileStart?.line ?? null;
3045
3048
  return {
3046
3049
  id: thread.id,
3047
3050
  status: thread.status ?? "unknown",
3048
3051
  threadContext: thread.threadContext?.filePath ?? null,
3052
+ line,
3049
3053
  comments: thread.comments.map(mapComment).filter((comment) => comment !== null)
3050
3054
  };
3051
3055
  }
@@ -3333,7 +3337,9 @@ function threadStatusLabel(status2) {
3333
3337
  function formatThreads(prId, title, threads) {
3334
3338
  const lines = [`Comment threads for pull request #${prId}: ${title}`];
3335
3339
  for (const thread of threads) {
3336
- lines.push("", `Thread #${thread.id} [${threadStatusLabel(thread.status)}] ${thread.threadContext ?? "(general)"}`);
3340
+ const lineSuffix = thread.line === null ? "" : `:${thread.line}`;
3341
+ const location = thread.threadContext ? `${thread.threadContext}${lineSuffix}` : "(general)";
3342
+ lines.push("", `Thread #${thread.id} [${threadStatusLabel(thread.status)}] ${location}`);
3337
3343
  for (const comment of thread.comments) {
3338
3344
  lines.push(` ${comment.author ?? "Unknown"}: ${comment.content}`);
3339
3345
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azdo-cli",
3
- "version": "0.10.0-develop.490",
3
+ "version": "0.10.0-develop.502",
4
4
  "description": "Azure DevOps CLI tool",
5
5
  "type": "module",
6
6
  "bin": {