azdo-cli 0.22.0-develop.886 → 0.22.0-develop.894

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 +8 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5025,6 +5025,8 @@ async function resolvePrCommandContext(options, resolveOpts = {}) {
5025
5025
  pat: credential
5026
5026
  };
5027
5027
  }
5028
+ var DESCRIPTION_TRUNCATION_NOTE = '\nNote: in --json, "description" is cut at 400 characters (a limit of the Azure DevOps list endpoint).\nFor the full text run: azdo pr comments --pr-number <N> --json (pullRequest.description).\n';
5029
+ var STATUS_DESCRIPTION_TRUNCATION_NOTE = '\nNote: when looking the PR up by branch (default or --branch), "description" in --json is cut at 400 characters\n(a limit of the Azure DevOps list endpoint); with --pr-number the full description is returned.\nFor the full text run: azdo pr comments --pr-number <N> --json (pullRequest.description).\n';
5028
5030
  var STATUS_PR_NUMBER_HELP = "show only the pull request with this numeric id, instead of the current branch's pull requests; mutually exclusive with --branch";
5029
5031
  var STATUS_BRANCH_HELP = "show the pull requests whose source branch is this one (with or without the refs/heads/ prefix), instead of the current branch's; no checkout needed. Mutually exclusive with --pr-number";
5030
5032
  function parseStatusTarget(options) {
@@ -5063,7 +5065,7 @@ async function findStatusPullRequests(resolved, target) {
5063
5065
  }
5064
5066
  function createPrStatusCommand() {
5065
5067
  const command = new Command13("status");
5066
- withCommonPrOptions(configureUnwrappedHelp(command)).description("Check pull requests for the current branch, another branch, or a specific pull request").option("--pr-number <id>", STATUS_PR_NUMBER_HELP).option("--branch <name>", STATUS_BRANCH_HELP).option("--json", "output JSON").action(async (options) => {
5068
+ withCommonPrOptions(configureUnwrappedHelp(command)).description("Check pull requests for the current branch, another branch, or a specific pull request").option("--pr-number <id>", STATUS_PR_NUMBER_HELP).option("--branch <name>", STATUS_BRANCH_HELP).option("--json", "output JSON").addHelpText("after", STATUS_DESCRIPTION_TRUNCATION_NOTE).action(async (options) => {
5067
5069
  validateOrgProjectPair(options);
5068
5070
  const target = parseStatusTarget(options);
5069
5071
  if (target === null) {
@@ -5393,7 +5395,10 @@ function createPrUpdateCommand() {
5393
5395
  withCommonPrOptions(configureUnwrappedHelp(command)).alias("edit").description("Update a pull request's title and/or description").option("--pr-number <N>", PR_NUMBER_HELP).option("--title <title>", "new pull request title").option("--title-file <path>", 'read the new title from a UTF-8 file; "-" reads standard input').option(
5394
5396
  "--description <description>",
5395
5397
  'new pull request description; REPLACES the existing description literally \u2014 no repository pull request template is looked up or prepended, unlike "azdo pr open"'
5396
- ).option("--description-file <path>", 'read the new description from a UTF-8 file; "-" reads standard input').option("--json", "output JSON").action(async (_options, command2) => {
5398
+ ).option("--description-file <path>", 'read the new description from a UTF-8 file; "-" reads standard input').option("--json", "output JSON").addHelpText(
5399
+ "after",
5400
+ '\nNote: the description is replaced literally. To edit it, start from the full text returned by\n"azdo pr comments --pr-number <N> --json" (pullRequest.description), never from "pr list" or\n"pr status" (by branch): those cut it at 400 characters, and writing that back deletes the rest.\n'
5401
+ ).action(async (_options, command2) => {
5397
5402
  await runPrUpdate(mergedPrOptions(command2));
5398
5403
  });
5399
5404
  return command;
@@ -6267,7 +6272,7 @@ async function attachWorkItemIds(context, repo, cred, pullRequests) {
6267
6272
  }
6268
6273
  function createPrListCommand() {
6269
6274
  const command = new Command13("list");
6270
- withCommonPrOptions(configureUnwrappedHelp(command)).description("List pull requests in the repository, optionally filtered by source branch").option("--branch <name>", "only pull requests whose source branch is this one (with or without the refs/heads/ prefix)").option("--status <status>", `pull request status filter (${LIST_STATUS_VALUES.join(" | ")})`, "active").option("--top <N>", `maximum number of pull requests to return (default ${DEFAULT_LIST_TOP})`).option("--work-items", "also return the ids of each pull request's linked work items (one extra API call per pull request)").option("--json", "output JSON").action(async (options) => {
6275
+ withCommonPrOptions(configureUnwrappedHelp(command)).description("List pull requests in the repository, optionally filtered by source branch").option("--branch <name>", "only pull requests whose source branch is this one (with or without the refs/heads/ prefix)").option("--status <status>", `pull request status filter (${LIST_STATUS_VALUES.join(" | ")})`, "active").option("--top <N>", `maximum number of pull requests to return (default ${DEFAULT_LIST_TOP})`).option("--work-items", "also return the ids of each pull request's linked work items (one extra API call per pull request)").option("--json", "output JSON").addHelpText("after", DESCRIPTION_TRUNCATION_NOTE).action(async (options) => {
6271
6276
  validateOrgProjectPair(options);
6272
6277
  const parsed = parseListOptions(options);
6273
6278
  if (parsed === null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "azdo-cli",
3
- "version": "0.22.0-develop.886",
3
+ "version": "0.22.0-develop.894",
4
4
  "description": "Azure DevOps CLI tool",
5
5
  "type": "module",
6
6
  "bin": {