chiefwiggum 1.3.45 → 1.3.47
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/cli.cjs +32 -19
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -1423,6 +1423,17 @@ Create 5-15 issues.${projectName ? ` Add each to project "${projectName}".` : ""
|
|
|
1423
1423
|
if (!usedFallback) {
|
|
1424
1424
|
const total = issues.length;
|
|
1425
1425
|
const owner = repoName.split("/")[0];
|
|
1426
|
+
try {
|
|
1427
|
+
(0, import_node_child_process6.execSync)(
|
|
1428
|
+
`gh label create chiefwiggum --description "Created by Chief Wiggum CLI" --color "FFA500" 2>/dev/null || true`,
|
|
1429
|
+
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
1430
|
+
);
|
|
1431
|
+
(0, import_node_child_process6.execSync)(
|
|
1432
|
+
`gh label create epic --description "Parent tracking issue" --color "6366F1" 2>/dev/null || true`,
|
|
1433
|
+
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
1434
|
+
);
|
|
1435
|
+
} catch {
|
|
1436
|
+
}
|
|
1426
1437
|
console.log(import_picocolors7.default.dim(" Creating epic from PRD..."));
|
|
1427
1438
|
const prdTitleMatch = prdGenerated.match(/^#\s+(.+)$/m);
|
|
1428
1439
|
const epicTitle = prdTitleMatch ? `Epic: ${prdTitleMatch[1]}` : "Epic: Project Implementation";
|
|
@@ -1437,21 +1448,34 @@ _Creating issues..._
|
|
|
1437
1448
|
let epicNumber = null;
|
|
1438
1449
|
let epicUrl = null;
|
|
1439
1450
|
try {
|
|
1440
|
-
const
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1451
|
+
const result2 = (0, import_node_child_process6.spawnSync)("gh", [
|
|
1452
|
+
"issue",
|
|
1453
|
+
"create",
|
|
1454
|
+
"--title",
|
|
1455
|
+
epicTitle,
|
|
1456
|
+
"--body",
|
|
1457
|
+
epicBodyInitial,
|
|
1458
|
+
"--label",
|
|
1459
|
+
"epic,chiefwiggum"
|
|
1460
|
+
], {
|
|
1445
1461
|
encoding: "utf-8",
|
|
1446
1462
|
stdio: ["pipe", "pipe", "pipe"]
|
|
1447
|
-
})
|
|
1463
|
+
});
|
|
1464
|
+
if (result2.status !== 0) {
|
|
1465
|
+
throw new Error(result2.stderr || "Failed to create epic");
|
|
1466
|
+
}
|
|
1467
|
+
epicUrl = result2.stdout.trim();
|
|
1448
1468
|
const epicNumMatch = epicUrl.match(/\/issues\/(\d+)$/);
|
|
1449
1469
|
epicNumber = epicNumMatch ? parseInt(epicNumMatch[1], 10) : null;
|
|
1450
1470
|
if (epicNumber) {
|
|
1451
1471
|
console.log(import_picocolors7.default.green(` \u2713 Created epic #${epicNumber}`));
|
|
1452
1472
|
}
|
|
1453
|
-
} catch {
|
|
1473
|
+
} catch (err) {
|
|
1454
1474
|
console.log(import_picocolors7.default.yellow(" Could not create epic issue. Continuing without parent tracking..."));
|
|
1475
|
+
const errMsg = err instanceof Error ? err.message : String(err);
|
|
1476
|
+
if (errMsg) {
|
|
1477
|
+
console.log(import_picocolors7.default.dim(` ${errMsg.slice(0, 100)}`));
|
|
1478
|
+
}
|
|
1455
1479
|
}
|
|
1456
1480
|
console.log(import_picocolors7.default.dim(` Creating ${total} child issues...`));
|
|
1457
1481
|
let projectNumber = null;
|
|
@@ -1521,17 +1545,6 @@ _Creating issues..._
|
|
|
1521
1545
|
availableLabels = new Set(labelsOutput.trim().split("\n").filter(Boolean));
|
|
1522
1546
|
} catch {
|
|
1523
1547
|
}
|
|
1524
|
-
try {
|
|
1525
|
-
(0, import_node_child_process6.execSync)(
|
|
1526
|
-
`gh label create chiefwiggum --description "Created by Chief Wiggum CLI" --color "FFA500" 2>/dev/null || true`,
|
|
1527
|
-
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
1528
|
-
);
|
|
1529
|
-
(0, import_node_child_process6.execSync)(
|
|
1530
|
-
`gh label create epic --description "Parent tracking issue" --color "6366F1" 2>/dev/null || true`,
|
|
1531
|
-
{ stdio: ["pipe", "pipe", "pipe"] }
|
|
1532
|
-
);
|
|
1533
|
-
} catch {
|
|
1534
|
-
}
|
|
1535
1548
|
let created = 0;
|
|
1536
1549
|
let failed = 0;
|
|
1537
1550
|
const failedIssues = [];
|
|
@@ -1543,7 +1556,7 @@ _Creating issues..._
|
|
|
1543
1556
|
const filled = Math.round(progress / 100 * barWidth);
|
|
1544
1557
|
const empty = barWidth - filled;
|
|
1545
1558
|
const bar = import_picocolors7.default.green("\u2588".repeat(filled)) + import_picocolors7.default.dim("\u2591".repeat(empty));
|
|
1546
|
-
process.stdout.write(`\r ${bar} ${progress}% (${i + 1}/${total}) Creating: ${issue.title.slice(0, 40)}
|
|
1559
|
+
process.stdout.write(`\x1B[2K\r ${bar} ${progress}% (${i + 1}/${total}) Creating: ${issue.title.slice(0, 40)}...`);
|
|
1547
1560
|
try {
|
|
1548
1561
|
const validLabels = issue.labels.filter((label) => availableLabels.size === 0 || availableLabels.has(label));
|
|
1549
1562
|
const allLabels = ["chiefwiggum", ...validLabels];
|