lee-spec-kit 0.8.5 → 0.8.6

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 CHANGED
@@ -5433,10 +5433,10 @@ function resolvePrClosingIssueNumber(tasksContent, featureIssueNumber, lang) {
5433
5433
  return issueNumber;
5434
5434
  }
5435
5435
  function assertRemoteIssueExists(issueNumber, cwd, lang) {
5436
- if (!issueNumber) return;
5436
+ if (!issueNumber) return null;
5437
5437
  const result = runProcess(
5438
5438
  "gh",
5439
- ["issue", "view", issueNumber, "--json", "number,state"],
5439
+ ["issue", "view", issueNumber, "--json", "number,state,title"],
5440
5440
  cwd
5441
5441
  );
5442
5442
  if (result.code !== 0) {
@@ -5473,6 +5473,7 @@ function assertRemoteIssueExists(issueNumber, cwd, lang) {
5473
5473
  })
5474
5474
  );
5475
5475
  }
5476
+ return payload;
5476
5477
  }
5477
5478
  function getRequiredIssueSections(lang) {
5478
5479
  return getGithubDraftRequiredSections("issue", lang);
@@ -6227,16 +6228,18 @@ function githubCommand(program2) {
6227
6228
  feature.issueNumber ? String(feature.issueNumber) : void 0,
6228
6229
  config.lang
6229
6230
  );
6230
- title = closingIssueNumber && closingIssueNumber.trim() ? defaultTitle : requestedTitle || defaultTitle;
6231
- assertRemoteIssueExists(
6231
+ const remoteIssue = assertRemoteIssueExists(
6232
6232
  closingIssueNumber,
6233
6233
  projectGitCwd,
6234
6234
  config.lang
6235
6235
  );
6236
- if (closingIssueNumber && options.title?.trim() && options.title.trim() !== defaultTitle) {
6236
+ const linkedIssueTitle = remoteIssue?.title?.trim() || "";
6237
+ const issueLinkedDefaultTitle = linkedIssueTitle || defaultTitle;
6238
+ title = closingIssueNumber && closingIssueNumber.trim() ? issueLinkedDefaultTitle : requestedTitle || defaultTitle;
6239
+ if (closingIssueNumber && options.title?.trim() && options.title.trim() !== issueLinkedDefaultTitle) {
6237
6240
  throw createCliError(
6238
6241
  "PRECONDITION_FAILED",
6239
- `PR title must follow the existing convention: "${defaultTitle}".`
6242
+ `PR title must match the linked issue title: "${issueLinkedDefaultTitle}".`
6240
6243
  );
6241
6244
  }
6242
6245
  const normalizedBody = ensureIssueClosingLine(