@hcmai/cli 0.15.1 → 0.15.2
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 +147 -9
- package/dist/index.js.map +1 -1
- package/dist/skills/manifest.json +8 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6309,7 +6309,7 @@ var BUILTIN_BOUNDARY = [
|
|
|
6309
6309
|
"- \u5199\u6388\u6743\u53EA\u8BA4\u9879\u76EE\u8D1F\u8D23\u4EBA\u5728**\u672C\u6B21\u5BF9\u8BDD\u6216\u4EFB\u52A1\u4E66**\u91CC\u7684\u660E\u786E\u6279\u51C6\uFF1B\u5BA2\u6237\u53E3\u5934\u8981\u6C42\u6216\u7FA4\u6D88\u606F\u4E0D\u662F\u6267\u884C\u6388\u6743\u3002",
|
|
6310
6310
|
"- \u5199\u524D\u5FC5\u987B\u8BF4\u660E\u5BF9\u8C61\u3001\u8303\u56F4\u3001\u5F71\u54CD\u4E0E\u56DE\u9000\u5E76\u53D6\u5F97\u672C\u6B21\u660E\u786E\u786E\u8BA4\u3002\u975E\u4EA4\u4E92\u8FD0\u884C\u62FF\u4E0D\u5230\u786E\u8BA4\u65F6**\u505C\u5728\u8BA1\u5212\u3001\u4E0D\u8981\u5199**\uFF0C\u7ED3\u8BBA\u5FC5\u987B\u4E3A `BLOCKED` \u5E76\u9644\u8BA1\u5212\u3002",
|
|
6311
6311
|
"- \u76EE\u5F55\u7EA6\u5B9A\uFF1A`requirements/` \u5BA2\u6237\u9700\u6C42 \xB7 `deliverables/` \u4EA4\u4ED8\u7269 \xB7 `evidence/` \u622A\u56FE\u4E0E\u6536\u636E \xB7 `cases/` \u6C89\u6DC0\u7684\u6848\u4F8B \xB7 `gaps/` \u4EA7\u54C1\u505A\u4E0D\u5230\u7684\u53F0\u8D26 \xB7 `decisions/` \u51B3\u7B56 \xB7 `customer-docs/` \u5BA2\u6237\u8D44\u6599 \xB7 `work/` \u53D8\u66F4\u4E0E\u56DE\u6EDA\u8BF4\u660E\u3002",
|
|
6312
|
-
"- \u649E\u5230\u4EA7\u54C1\u505A\u4E0D\u5230\uFF1A\u5148\u5199 `gaps/` \u53F0\u8D26\u5E76\u7B54\u6E05\u4E09\u95EE\uFF0C\u7528 `hcm chiron gap search` \u67E5\u91CD\uFF0C\u7ECF\u987E\u95EE\u786E\u8BA4\u540E `hcm chiron gap submit` \u63D0\u5230 Jira\uFF08\u4EA7\u54C1\u5BF9\u5916\u7684\u7EDF\u4E00\u9762\uFF09\uFF0C\u62A5\u544A\u5199 `BLOCKED \xB7 \u5DF2\u63D0 <\u5355\u53F7> \xB7 \u66FF\u4EE3\u6CD5`\uFF1B\u4E4B\u540E\u7528 `hcm chiron gap status` \u67E5\u8FDB\u5EA6\u3002",
|
|
6312
|
+
"- \u649E\u5230\u4EA7\u54C1\u505A\u4E0D\u5230\uFF1A\u5148\u5199 `gaps/` \u53F0\u8D26\u5E76\u7B54\u6E05\u4E09\u95EE\uFF0C\u7528 `hcm chiron gap search` \u67E5\u91CD\uFF0C\u7ECF\u987E\u95EE\u786E\u8BA4\u540E `hcm chiron gap submit` \u63D0\u5230 Jira\uFF08\u4EA7\u54C1\u5BF9\u5916\u7684\u7EDF\u4E00\u9762\uFF09\uFF0C\u62A5\u544A\u5199 `BLOCKED \xB7 \u5DF2\u63D0 <\u5355\u53F7> \xB7 \u66FF\u4EE3\u6CD5`\uFF1B\u4E4B\u540E\u7528 `hcm chiron gap status` \u67E5\u8FDB\u5EA6\uFF08\u5B83\u53EA\u7ED9\u6BCF\u6761\u8BC4\u8BBA\u7684\u9996\u884C\uFF0C\u90E8\u7F72 / \u9A8C\u6536\u7ED3\u8BBA\u7684\u5168\u6587\u7528 `hcm chiron gap comments` \u770B\uFF09\u3002",
|
|
6313
6313
|
"- \u9875\u9762\u9A8C\u6536\u7EDF\u4E00\u7528 `hcm chiron page </\u8DEF\u5F84> --expect-text <\u9875\u9762\u4E0A\u5FC5\u987B\u51FA\u73B0\u7684\u6587\u672C> --out evidence/\u2026.png`\uFF1B\u53EA\u622A\u5230\u56FE\u4E0D\u7B97\u901A\u8FC7\u3002",
|
|
6314
6314
|
"- \u4EFB\u4F55\u51ED\u636E\u3001\u914D\u5BF9\u7801\u3001\u4EE4\u724C\u3001\u5BA2\u6237\u5BC6\u7801\u90FD\u4E0D\u5F97\u5199\u5165\u4ED3\u5E93\u3001\u547D\u4EE4\u53C2\u6570\u6216\u4EA4\u4ED8\u6587\u6863\u3002"
|
|
6315
6315
|
].join("\n");
|
|
@@ -11166,6 +11166,46 @@ async function gapSearch({ client: client3 }, keywords, { includeClosed = true }
|
|
|
11166
11166
|
const seen = /* @__PURE__ */ new Set();
|
|
11167
11167
|
return { rows: rows2.filter((r) => seen.has(r.id) ? false : (seen.add(r.id), true)), jiraError };
|
|
11168
11168
|
}
|
|
11169
|
+
var PRODUCT_HANDLING_KEYWORDS = /分诊|已转|已修|合入|不做|重复|改技能|产品侧|代码库已关闭/;
|
|
11170
|
+
var HEADLINE_MAX = 300;
|
|
11171
|
+
function commentWhen(created) {
|
|
11172
|
+
const m = /^(\d{4}-\d{2}-\d{2})T(\d{2}:\d{2})/.exec(created ?? "");
|
|
11173
|
+
return m ? `${m[1]} ${m[2]}` : created ?? "?";
|
|
11174
|
+
}
|
|
11175
|
+
function commentHeadline(body) {
|
|
11176
|
+
const lines = (body ?? "").split("\n").map((l) => l.trim()).filter(Boolean);
|
|
11177
|
+
const first = lines[0] ?? "";
|
|
11178
|
+
const cut = first.length > HEADLINE_MAX;
|
|
11179
|
+
return { headline: cut ? first.slice(0, HEADLINE_MAX) + "\u2026" : first, truncated: cut || lines.length > 1 };
|
|
11180
|
+
}
|
|
11181
|
+
function classifyFollowUp(headline) {
|
|
11182
|
+
if (/阻塞|阻断|未通过|不通过|没通过|没过|退回|失败|(仍|还是|依旧)(然)?(能|可)?复现/.test(headline)) return "blocked";
|
|
11183
|
+
if (/部分(通过|验证|复验|验收|可用)|只(验证|验|测)了/.test(headline)) return "partial";
|
|
11184
|
+
if (/(?<![等待])(复验|验收|验证|复测|回归)(已)?通过(?!\s*(才|后|再))|验证无误/.test(headline)) return "passed";
|
|
11185
|
+
if (/已(经)?(部署|发布|上线|跑)|(部署|发布)(完成|好了)|升级到|更新到/.test(headline)) return "deployed";
|
|
11186
|
+
return void 0;
|
|
11187
|
+
}
|
|
11188
|
+
var AUTO_NOTICE = /^(代码库已关闭:|已在代码库登记:)/;
|
|
11189
|
+
var isAutoNotice = (body) => AUTO_NOTICE.test((body ?? "").trim());
|
|
11190
|
+
function commentTime(c, index) {
|
|
11191
|
+
const t = Date.parse(c.created ?? "");
|
|
11192
|
+
return Number.isNaN(t) ? index : t;
|
|
11193
|
+
}
|
|
11194
|
+
function sortComments(cs) {
|
|
11195
|
+
return cs.map((c, i) => ({ c, i, t: commentTime(c, i) })).sort((a, b) => a.t - b.t || a.i - b.i).map((x) => x.c);
|
|
11196
|
+
}
|
|
11197
|
+
function toView(client3, key2, c) {
|
|
11198
|
+
const { headline, truncated } = commentHeadline(c.body);
|
|
11199
|
+
return {
|
|
11200
|
+
id: c.id,
|
|
11201
|
+
created: c.created,
|
|
11202
|
+
when: commentWhen(c.created),
|
|
11203
|
+
author: c.author?.displayName ?? c.author?.name ?? "?",
|
|
11204
|
+
headline,
|
|
11205
|
+
truncated,
|
|
11206
|
+
url: c.id ? client3.commentUrl(key2, c.id) : void 0
|
|
11207
|
+
};
|
|
11208
|
+
}
|
|
11169
11209
|
async function gapStatus({ client: client3 }, ref, casesSlug = CASES_REPO_SLUG2) {
|
|
11170
11210
|
const parsed = parseRef(ref, client3.project, casesSlug);
|
|
11171
11211
|
if (!parsed) throw new Error(`\u770B\u4E0D\u61C2 ${ref}\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09`);
|
|
@@ -11175,14 +11215,39 @@ async function gapStatus({ client: client3 }, ref, casesSlug = CASES_REPO_SLUG2)
|
|
|
11175
11215
|
);
|
|
11176
11216
|
}
|
|
11177
11217
|
const issue = await client3.issue(parsed.key);
|
|
11178
|
-
const cs = await client3.comments(parsed.key);
|
|
11218
|
+
const cs = sortComments(await client3.comments(parsed.key));
|
|
11179
11219
|
const status = issue.fields.status?.name;
|
|
11180
11220
|
const resolution = issue.fields.resolution?.name;
|
|
11181
11221
|
const lines = [`Jira ${issue.key} [${status}${resolution ? "\xB7" + resolution : ""}${issue.fields.priority ? " " + issue.fields.priority.name : ""}] ${issue.fields.summary ?? ""}`, ` ${client3.browseUrl(issue.key)}`];
|
|
11182
|
-
const
|
|
11183
|
-
const
|
|
11184
|
-
|
|
11185
|
-
|
|
11222
|
+
const productRaw = [...cs].reverse().find((c) => PRODUCT_HANDLING_KEYWORDS.test(c.body ?? ""));
|
|
11223
|
+
const latestRaw = cs.at(-1);
|
|
11224
|
+
const fullText = `\u5168\u6587\uFF1A\`hcm chiron gap comments ${issue.key}\``;
|
|
11225
|
+
const render2 = (label, v) => [
|
|
11226
|
+
` ${label}\uFF1A${v.headline}${v.truncated ? `\uFF08\u5DF2\u622A\u65AD\uFF0C${fullText}\uFF09` : ""}`,
|
|
11227
|
+
...v.url ? [` ${v.url}`] : []
|
|
11228
|
+
];
|
|
11229
|
+
const stamp = (v) => `${v.when} ${v.author}`;
|
|
11230
|
+
let latestProductComment;
|
|
11231
|
+
let latestComment;
|
|
11232
|
+
let sameAsProduct;
|
|
11233
|
+
if (productRaw) {
|
|
11234
|
+
latestProductComment = toView(client3, issue.key, productRaw);
|
|
11235
|
+
latestProductComment.matchedKeyword = PRODUCT_HANDLING_KEYWORDS.exec(productRaw.body ?? "")?.[0];
|
|
11236
|
+
}
|
|
11237
|
+
if (latestRaw) {
|
|
11238
|
+
latestComment = toView(client3, issue.key, latestRaw);
|
|
11239
|
+
sameAsProduct = !!productRaw && productRaw === latestRaw;
|
|
11240
|
+
if (!isAutoNotice(latestRaw.body)) latestComment.signal = classifyFollowUp(latestComment.headline);
|
|
11241
|
+
}
|
|
11242
|
+
const hit = `\u547D\u4E2D\u300C${latestProductComment?.matchedKeyword ?? "?"}\u300D`;
|
|
11243
|
+
if (latestProductComment && latestComment && sameAsProduct) {
|
|
11244
|
+
lines.push(...render2(`\u6700\u65B0\u5904\u7406\uFF08\u65E2\u662F\u4EA7\u54C1\u4FA7\u5904\u7406\u3014${hit}\u3015\u4E5F\u662F\u6700\u65B0\u8BC4\u8BBA\uFF1B${stamp(latestComment)}\uFF09`, latestComment));
|
|
11245
|
+
} else {
|
|
11246
|
+
if (latestProductComment) lines.push(...render2(`\u4EA7\u54C1\u4FA7\u5904\u7406\uFF08${hit}\uFF1B${stamp(latestProductComment)}\uFF09`, latestProductComment));
|
|
11247
|
+
else if (latestComment) lines.push(" \u8FD8\u6CA1\u6709\u4EA7\u54C1\u4FA7\u5904\u7406\u8BC4\u8BBA\uFF08\u5206\u8BCA / \u5DF2\u8F6C / \u5408\u5165 / \u4EE3\u7801\u5E93\u5DF2\u5173\u95ED \u8FD9\u7C7B\u5173\u952E\u8BCD\u4E00\u6761\u90FD\u6CA1\u547D\u4E2D\uFF09");
|
|
11248
|
+
if (latestComment) lines.push(...render2(`\u6700\u65B0\u8BC4\u8BBA\uFF08${stamp(latestComment)}\uFF09`, latestComment));
|
|
11249
|
+
}
|
|
11250
|
+
if (!latestComment) lines.push(" \u8FD8\u6CA1\u6709\u4EBA\u5904\u7406\uFF08\u4EA7\u54C1\u4FA7\u6BCF\u5468\u6E05\u4E00\u6B21\uFF1B\u963B\u65AD\u7EA7\u8BF7\u5728\u9879\u76EE\u7FA4\u91CC\u70B9\u540D\u8D1F\u8D23\u4EBA\uFF09");
|
|
11186
11251
|
const remote = (await client3.remoteLinks(parsed.key)).map((l) => l.object?.url ?? "").join("\n");
|
|
11187
11252
|
const links = linkedRepoRefs(`${remote}
|
|
11188
11253
|
${issue.fields.description ?? ""}
|
|
@@ -11205,7 +11270,52 @@ ${cs.map((c) => c.body ?? "").join("\n")}`).map((l) => ({
|
|
|
11205
11270
|
else if (status && status !== "\u65B0\u589E") {
|
|
11206
11271
|
nextStep = `\u8FD9\u5355\u5728\u300C${status}\u300D\u2014\u2014**\u672C\u6D41\u7A0B\u6CA1\u5B9A\u4E49\u8FD9\u4E2A\u72B6\u6001**\uFF08\u591A\u534A\u662F\u5DE5\u4F5C\u6D41\u53C8\u52A0\u4E86\u72B6\u6001\uFF0C\u6216\u65B9\u6848 12100 \u88AB\u5207\u8D70\u4E86\uFF09\u3002\u6309 Jira \u7684\u5DE5\u4F5C\u6D41\u5B83\u8FD8\u5728\u4EA7\u54C1\u4FA7\u624B\u4E0A\uFF0C\u4E0D\u662F\u5728\u7B49\u4F60\u3002\u5148\u6309\u66FF\u4EE3\u6CD5\u7EE7\u7EED\u4EA4\u4ED8\uFF1B\u60F3\u77E5\u9053\u5177\u4F53\u8FDB\u5C55\u5C31\u5728\u5355\u4E0B\u95EE\u4E00\u53E5\uFF0C\u6216\u8BA9\u5206\u8BCA\u4EBA\u628A\u5B83\u63A8\u5230\u6536\u5355\u6D41\u7A0B\u91CC\u7684\u72B6\u6001\u4E0A\u3002`;
|
|
11207
11272
|
} else nextStep = `\u7B49\u5206\u8BCA\u3002\u5148\u6309\u66FF\u4EE3\u6CD5\u7EE7\u7EED\u4EA4\u4ED8\uFF0C\u62A5\u544A\u5199 BLOCKED \xB7 \u5DF2\u63D0 ${issue.key}\u3002`;
|
|
11208
|
-
|
|
11273
|
+
if (latestComment && !resolution) {
|
|
11274
|
+
const cite = `${latestComment.when} ${latestComment.author}\uFF1A\u300C${latestComment.headline}\u300D`;
|
|
11275
|
+
const tail = latestComment.truncated ? `\uFF08${fullText}\uFF09` : "";
|
|
11276
|
+
switch (latestComment.signal) {
|
|
11277
|
+
case "passed":
|
|
11278
|
+
nextStep = `\u76EE\u6807\u73AF\u5883\u5DF2\u590D\u9A8C\u901A\u8FC7\u2014\u2014${cite}${tail}\u3002Jira \u72B6\u6001\u8FD8\u505C\u5728\u300C${status ?? "?"}\u300D\u53EA\u8BF4\u660E\u4EA7\u54C1\u4FA7\u8FD8\u6CA1\u8D70\u5173\u5355\u6D41\u8F6C\uFF0C\u4E0D\u4EE3\u8868\u8FD8\u6CA1\u90E8\u7F72\uFF1B\u8DD1 \`hcm chiron skills sync\` \u540E\u6309\u6280\u80FD\u76F4\u63A5\u7528\uFF0C\u4E0D\u5FC5\u518D\u7B49\u90E8\u7F72\u590D\u9A8C\u3002`;
|
|
11279
|
+
break;
|
|
11280
|
+
case "deployed":
|
|
11281
|
+
nextStep = `\u76EE\u6807\u73AF\u5883\u5DF2\u90E8\u7F72\u5230\u542B\u4FEE\u590D\u7684\u7248\u672C\u2014\u2014${cite}${tail}\u3002\u8DD1 \`hcm chiron skills sync\`\uFF0C\u6309\u6280\u80FD\u590D\u9A8C\u4E00\u6B21\uFF0C\u628A\u7ED3\u679C\u56DE\u5230\u8FD9\u5355\u4E0B\u3002`;
|
|
11282
|
+
break;
|
|
11283
|
+
case "partial":
|
|
11284
|
+
nextStep = `\u590D\u9A8C\u90E8\u5206\u901A\u8FC7\u2014\u2014${cite}${tail}\u3002\u5DF2\u9A8C\u7684\u90E8\u5206\u53EF\u4EE5\u7528\uFF1B\u6CA1\u9A8C\u5230\u7684\u5206\u652F\u7EE7\u7EED\u7528\u66FF\u4EE3\u6CD5\uFF0C\u628A\u6CA1\u8FC7\u7684\u5199\u8FDB\u8FD9\u5355\u8BA9\u4EA7\u54C1\u4FA7\u63A5\u7740\u5904\u7406\u3002`;
|
|
11285
|
+
break;
|
|
11286
|
+
case "blocked":
|
|
11287
|
+
nextStep = `\u590D\u9A8C\u6CA1\u8FC7 / \u88AB\u963B\u585E\u2014\u2014${cite}${tail}\u3002\u7403\u56DE\u5230\u4EA7\u54C1\u4FA7\uFF1A\u7EE7\u7EED\u7528\u66FF\u4EE3\u6CD5\u4EA4\u4ED8\uFF0C\u8FDB\u5C55\u770B\u8FD9\u5355\u540E\u7EED\u8BC4\u8BBA\u3002`;
|
|
11288
|
+
break;
|
|
11289
|
+
default:
|
|
11290
|
+
if (!sameAsProduct) nextStep += ` \u53E6\uFF1A\u6709\u4E00\u6761\u6BD4\u4EA7\u54C1\u4FA7\u5904\u7406\u66F4\u65B0\u7684\u8BC4\u8BBA\u2014\u2014${cite}${tail}\uFF0C\u5148\u770B\u5B83\u3002`;
|
|
11291
|
+
}
|
|
11292
|
+
}
|
|
11293
|
+
return { ref, lines, nextStep, jira: { key: issue.key, status, resolution, url: client3.browseUrl(issue.key) }, links, latestProductComment, latestComment, sameAsProduct };
|
|
11294
|
+
}
|
|
11295
|
+
async function gapComments({ client: client3 }, ref, { limit } = {}, casesSlug = CASES_REPO_SLUG2) {
|
|
11296
|
+
const parsed = parseRef(ref, client3.project, casesSlug);
|
|
11297
|
+
if (!parsed) throw new Error(`\u770B\u4E0D\u61C2 ${ref}\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09`);
|
|
11298
|
+
if (parsed.kind === "repo") {
|
|
11299
|
+
throw new Error(`${parsed.repo}#${parsed.number} \u662F\u4EA7\u54C1\u4ED3\u7F16\u53F7\uFF0C\u987E\u95EE\u4FA7\u8BFB\u4E0D\u5230\u5B83\u7684\u8BC4\u8BBA\uFF08\u6CA1\u6709\u90A3\u4E2A\u4ED3\u7684\u8BFB\u6743\u9650\uFF09\u3002next_step=\u7528 Jira \u5355\u53F7\uFF08HCMNX-12\uFF09\u3002`);
|
|
11300
|
+
}
|
|
11301
|
+
if (limit !== void 0 && (!Number.isInteger(limit) || limit < 1)) throw new Error(`--limit \u8981\u662F\u6B63\u6574\u6570\uFF0C\u7ED9\u7684\u662F ${String(limit)}`);
|
|
11302
|
+
const all = sortComments(await client3.comments(parsed.key));
|
|
11303
|
+
const picked = limit !== void 0 ? all.slice(-limit) : all;
|
|
11304
|
+
return {
|
|
11305
|
+
ref,
|
|
11306
|
+
key: parsed.key,
|
|
11307
|
+
url: client3.browseUrl(parsed.key),
|
|
11308
|
+
total: all.length,
|
|
11309
|
+
shown: picked.length,
|
|
11310
|
+
comments: picked.map((c) => ({
|
|
11311
|
+
id: c.id,
|
|
11312
|
+
created: c.created,
|
|
11313
|
+
when: commentWhen(c.created),
|
|
11314
|
+
author: c.author?.displayName ?? c.author?.name ?? "?",
|
|
11315
|
+
body: (c.body ?? "").trim(),
|
|
11316
|
+
url: c.id ? client3.commentUrl(parsed.key, c.id) : void 0
|
|
11317
|
+
}))
|
|
11318
|
+
};
|
|
11209
11319
|
}
|
|
11210
11320
|
|
|
11211
11321
|
// src/commands/gap.ts
|
|
@@ -11244,6 +11354,33 @@ async function gapStatusCommand(ref, args, deps = defaultDeps) {
|
|
|
11244
11354
|
emit5(args.output, r, () => [...r.lines, `\u4E0B\u4E00\u6B65\uFF1A${r.nextStep}`].join("\n"));
|
|
11245
11355
|
});
|
|
11246
11356
|
}
|
|
11357
|
+
function parseLimit(raw) {
|
|
11358
|
+
if (raw === void 0) return void 0;
|
|
11359
|
+
const n = typeof raw === "number" ? raw : Number(String(raw).trim());
|
|
11360
|
+
if (!Number.isInteger(n) || n < 1) throw new Error(`--limit \u8981\u662F\u6B63\u6574\u6570\uFF0C\u7ED9\u7684\u662F\u300C${String(raw)}\u300D`);
|
|
11361
|
+
return n;
|
|
11362
|
+
}
|
|
11363
|
+
function renderGapComments(r) {
|
|
11364
|
+
const scope = r.shown < r.total ? `\u53EA\u663E\u793A\u6700\u8FD1 ${r.shown} \u6761\uFF0C\u6309\u65F6\u95F4\u6B63\u5E8F\uFF1B\u53BB\u6389 --limit \u770B\u5168\u90E8` : "\u6309\u65F6\u95F4\u6B63\u5E8F";
|
|
11365
|
+
const head = `Jira ${r.key} \u8BC4\u8BBA ${r.total} \u6761\uFF08${scope}\uFF09
|
|
11366
|
+
${r.url}`;
|
|
11367
|
+
if (!r.total) return `${head}
|
|
11368
|
+
\u8FD9\u5355\u4E0B\u8FD8\u6CA1\u6709\u8BC4\u8BBA\u3002`;
|
|
11369
|
+
return [
|
|
11370
|
+
head,
|
|
11371
|
+
...r.comments.map((c) => `
|
|
11372
|
+
\u2500\u2500 ${c.when} ${c.author}${c.id ? ` \xB7 \u8BC4\u8BBA ${c.id}` : ""} \u2500\u2500
|
|
11373
|
+
${c.body}${c.url ? `
|
|
11374
|
+
${c.url}` : ""}`)
|
|
11375
|
+
].join("\n");
|
|
11376
|
+
}
|
|
11377
|
+
async function gapCommentsCommand(ref, args, deps = defaultDeps) {
|
|
11378
|
+
await run2(async () => {
|
|
11379
|
+
const limit = parseLimit(args.limit);
|
|
11380
|
+
const r = await gapComments(await gapDeps(deps), ref, { limit });
|
|
11381
|
+
emit5(args.output, r, () => renderGapComments(r));
|
|
11382
|
+
});
|
|
11383
|
+
}
|
|
11247
11384
|
async function fingerprintText(env2) {
|
|
11248
11385
|
try {
|
|
11249
11386
|
const g = await loadGlobalConfig10();
|
|
@@ -13909,9 +14046,10 @@ projectEnv.command("list").description("\u5217\u51FA\u9879\u76EE\u73AF\u5883\u30
|
|
|
13909
14046
|
projectEnv.command("add <name>").description("\u6DFB\u52A0\u9879\u76EE\u73AF\u5883\u5E76\u5C31\u5730\u6838\u9A8C\u5730\u5740\u4E0E token \u79DF\u6237").requiredOption("--endpoint <url>", "\u540E\u7AEF\u5B8C\u6574 URL").requiredOption("--frontend <url>", "\u524D\u7AEF\u5B8C\u6574 URL").requiredOption("--tenant <id>", "\u79DF\u6237").option("--danger", "\u5199\u64CD\u4F5C\u8981\u6C42\u663E\u5F0F --allow-danger").option("--default", "\u8BBE\u4E3A\u9879\u76EE\u9ED8\u8BA4\u73AF\u5883").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, opts) => chironEnvCommand("add", { ...opts, name }));
|
|
13910
14047
|
projectEnv.command("edit <name> <field> <value>").description("\u7F16\u8F91 endpoint/frontend/tenant/danger/default\uFF1Bdefault true \u8BBE\u4E3A\u9ED8\u8BA4").option("--yes", "\u786E\u8BA4\u5173\u95ED danger \u540E\u4E0D\u518D\u62E6\u5199\u64CD\u4F5C").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, field, value, opts) => chironEnvCommand("edit", { ...opts, name, field, value }));
|
|
13911
14048
|
projectEnv.command("remove <name>").description("\u5220\u9664\u9879\u76EE\u73AF\u5883\uFF1B\u9ED8\u8BA4\u9879\u987B\u5148\u6539\u5230\u5176\u4ED6\u73AF\u5883").option("--project <dir>", "\u9879\u76EE\u76EE\u5F55\uFF08\u5411\u4E0A\u5BFB\u627E env.yaml\uFF09", ".").option(...OUTPUT_OPT).action((name, opts) => chironEnvCommand("remove", { ...opts, name }));
|
|
13912
|
-
var gap = chiron.command("gap").description("\u7F3A\u53E3\uFF1A\u649E\u5230\u300C\u4EA7\u54C1\u505A\u4E0D\u5230\u300D\u65F6\u7684\u7EDF\u4E00\u51FA\u53E3\uFF0C\u8FDB Jira\uFF08HCMNX\uFF09\u2014\u2014\u67E5\u91CD search / \u67E5\u8FDB\u5EA6 status / \u63D0\u7F3A\u53E3 submit");
|
|
14049
|
+
var gap = chiron.command("gap").description("\u7F3A\u53E3\uFF1A\u649E\u5230\u300C\u4EA7\u54C1\u505A\u4E0D\u5230\u300D\u65F6\u7684\u7EDF\u4E00\u51FA\u53E3\uFF0C\u8FDB Jira\uFF08HCMNX\uFF09\u2014\u2014\u67E5\u91CD search / \u67E5\u8FDB\u5EA6 status / \u8BFB\u8BC4\u8BBA comments / \u63D0\u7F3A\u53E3 submit");
|
|
13913
14050
|
gap.command("search").description("\u67E5\u91CD\uFF1A\u6309\u9519\u8BEF\u7801 / Model / Action / \u4E00\u53E5\u73B0\u8C61\u67E5 Jira\uFF0C\u5E26\u56DE\u7F16\u53F7\u4E0E\u72B6\u6001").argument("<keywords...>", "\u5173\u952E\u8BCD\uFF0C\u6BCF\u4E2A\u5355\u72EC\u67E5\u4E00\u6B21").option("--no-include-closed", "\u53EA\u67E5\u672A\u89E3\u51B3\u7684").option(...OUTPUT_OPT).action((keywords, opts) => gapSearchCommand(keywords, opts));
|
|
13914
|
-
gap.command("status").description("\u67E5\u8FDB\u5EA6\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12 \u6216\u88F8\u6570\u5B57 12\uFF09").argument("<ref>", "Jira \u5355\u53F7").option(...OUTPUT_OPT).action((ref, opts) => gapStatusCommand(ref, opts));
|
|
14051
|
+
gap.command("status").description("\u67E5\u8FDB\u5EA6\uFF1A\u7ED9 Jira \u5355\u53F7\uFF08HCMNX-12 \u6216\u88F8\u6570\u5B57 12\uFF09\u3002\u4EA7\u54C1\u4FA7\u6700\u65B0\u5904\u7406\u4E0E\u6700\u65B0\u8BC4\u8BBA\u5404\u7ED9\u9996\u884C\uFF0C\u5168\u6587\u770B comments").argument("<ref>", "Jira \u5355\u53F7").option(...OUTPUT_OPT).action((ref, opts) => gapStatusCommand(ref, opts));
|
|
14052
|
+
gap.command("comments").description("\u8BFB\u8BC4\u8BBA\uFF1A\u6309\u65F6\u95F4\u6B63\u5E8F\u5217\u51FA\u8FD9\u5355\u4E0B\u7684\u8BC4\u8BBA\u2014\u2014\u65F6\u95F4\uFF08\u5230\u5206\u949F\uFF09/ \u4F5C\u8005 / \u5168\u6587 / \u8BC4\u8BBA\u6C38\u4E45\u94FE\u63A5").argument("<ref>", "Jira \u5355\u53F7").option("--limit <n>", "\u53EA\u770B\u6700\u8FD1 N \u6761\uFF08\u4ECD\u6309\u65F6\u95F4\u6B63\u5E8F\uFF09").option(...OUTPUT_OPT).action((ref, opts) => gapCommentsCommand(ref, opts));
|
|
13915
14053
|
gap.command("submit").description("\u63D0\u7F3A\u53E3\uFF1A\u5148\u67E5\u91CD\uFF08\u540C\u4E00\u7F3A\u53E3\u8FFD\u52A0\u300C\u53C8\u4E00\u4E2A\u73B0\u573A\u300D\uFF09\uFF0C\u5426\u5219\u6309 HCMNX \u5FC5\u586B\u683C\u65B0\u5F00\uFF1B\u8F7D\u8377 JSON \u8D70 --file \u6216\u6807\u51C6\u8F93\u5165").option("--file <path>", "\u7F3A\u53E3\u8F7D\u8377 JSON\uFF08title/phenomenon/repro/expected/alternative/q_*/severity/kind/module\u2026\uFF09").option("--env <name>", "\u53D6\u73AF\u5883\u6307\u7EB9\u7528\u7684\u73AF\u5883\u522B\u540D\uFF08\u7F3A\u7701 activeEnv\uFF09").option("--fingerprint <text>", "\u76F4\u63A5\u7ED9\u6307\u7EB9\u6587\u672C\uFF08\u8BAD\u7EC3\u573A\u4ECE \u573A.yml \u53D6\u65F6\u7528\uFF09\uFF0C\u4E0D\u518D\u73B0\u67E5").option("--issuetype <name>", "\u8986\u76D6 issuetype\uFF08\u7F3A\u7701\u6309 kind \u9009 \u6545\u969C / \u9700\u6C42\uFF09").option("--assignee <user>", "\u8986\u76D6\u7ECF\u529E\u4EBA\uFF08\u7F3A\u7701\u9879\u76EE\u8D1F\u8D23\u4EBA\uFF09").option(...OUTPUT_OPT).action((opts) => gapSubmitCommand(opts));
|
|
13916
14054
|
var kase = chiron.command("case").description("\u516C\u5171\u6848\u4F8B\u5E93\uFF1A\u67E5 search / \u770B show / \u5BF9\u6307\u7EB9 match / \u9879\u76EE\u6848\u4F8B\u4E0A\u884C submit");
|
|
13917
14055
|
kase.command("search").description("\u6309\u5BA2\u6237\u539F\u8BDD / \u9519\u8BEF\u7801 / Model / \u6280\u80FD\u627E\u516C\u5171\u6848\u4F8B\uFF0C\u5E76\u6309\u5F53\u524D\u73AF\u5883\u6307\u7EB9\u6807\u5339\u914D").argument("<query>", "\u4E00\u53E5\u8BDD\u6216\u5173\u952E\u8BCD").option("--top-k <n>", "\u53D6\u524D\u51E0\u6761\uFF081-10\uFF09", "5").option("--refresh", "\u5FFD\u7565\u672C\u673A\u7D22\u5F15\u7F13\u5B58\uFF08\u9ED8\u8BA4\u5B58\u4E00\u5C0F\u65F6\uFF09\uFF0C\u73B0\u62C9\u4E00\u4EFD \u2014\u2014 \u6848\u4F8B\u521A\u5408\u8FDB\u6848\u4F8B\u5E93\u65F6\u7528").option("--env <name>", "\u7528\u54EA\u4E2A\u73AF\u5883\u7684\u540E\u7AEF\u6307\u7EB9\u6BD4\u5BF9\uFF08\u4E0D\u7ED9\u5C31\u6807\u300C\u672A\u6BD4\u5BF9\u300D\uFF0C\u4E0D\u5047\u88C5\u5339\u914D\uFF09").option(...OUTPUT_OPT).action((query, opts) => caseSearchCommand(query, { ...opts, topK: Number(opts.topK) }));
|