pull-request-split-advisor 3.2.11 → 3.2.13
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.js +10 -8
- package/dist/config/default-config.js +3 -3
- package/dist/output/report.js +3 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -399,9 +399,18 @@ async function main() {
|
|
|
399
399
|
], "red");
|
|
400
400
|
// ─── Estado de la cascada en terminal ───────────────────────────────────
|
|
401
401
|
ui.section("ESTADO DE LA CASCADA", "#");
|
|
402
|
+
// Rama actual primero (#1)
|
|
403
|
+
ui.subsection(`#1 ${currentBranch} ✔ rama actual`);
|
|
404
|
+
if (currentBranchCommits.length === 0) {
|
|
405
|
+
ui.muted(" Sin commits detectados.");
|
|
406
|
+
}
|
|
407
|
+
else {
|
|
408
|
+
ui.table(["SHA", "Mensaje"], currentBranchCommits.map((c) => [c.sha, c.subject]), true);
|
|
409
|
+
}
|
|
410
|
+
// Ramas hermanas a continuación (#2, #3, …)
|
|
402
411
|
for (let i = 0; i < siblings.length; i++) {
|
|
403
412
|
const sibling = siblings[i];
|
|
404
|
-
ui.subsection(`#${i +
|
|
413
|
+
ui.subsection(`#${i + 2} ${sibling.name}`);
|
|
405
414
|
if (sibling.commits.length === 0) {
|
|
406
415
|
ui.muted(" Sin commits detectados.");
|
|
407
416
|
}
|
|
@@ -409,13 +418,6 @@ async function main() {
|
|
|
409
418
|
ui.table(["SHA", "Mensaje"], sibling.commits.map((c) => [c.sha, c.subject]), true);
|
|
410
419
|
}
|
|
411
420
|
}
|
|
412
|
-
ui.subsection(`#${siblings.length + 1} ${currentBranch} ✔ rama actual`);
|
|
413
|
-
if (currentBranchCommits.length === 0) {
|
|
414
|
-
ui.muted(" Sin commits detectados.");
|
|
415
|
-
}
|
|
416
|
-
else {
|
|
417
|
-
ui.table(["SHA", "Mensaje"], currentBranchCommits.map((c) => [c.sha, c.subject]), true);
|
|
418
|
-
}
|
|
419
421
|
}
|
|
420
422
|
// ─── Pipeline de análisis ────────────────────────────────────────────────
|
|
421
423
|
ui.spinner.start("Analizando cambios del working tree...");
|
|
@@ -74,10 +74,10 @@ export const defaultConfig = {
|
|
|
74
74
|
/**
|
|
75
75
|
* Score mínimo para que el plan sea válido.
|
|
76
76
|
* - < 3.0 : casi cualquier distribución es válida
|
|
77
|
-
* - 4.0 : balance razonable
|
|
78
|
-
* - 5.0 : solo PRs perfectamente pequeños
|
|
77
|
+
* - 4.0 : balance razonable
|
|
78
|
+
* - 5.0 : solo PRs perfectamente pequeños (default)
|
|
79
79
|
*/
|
|
80
|
-
targetScore:
|
|
80
|
+
targetScore: 5,
|
|
81
81
|
/**
|
|
82
82
|
* Cuántos valores de `branchCount` explorar por encima del mínimo teórico.
|
|
83
83
|
* El motor se detiene en la primera iteración que produce un plan válido.
|
package/dist/output/report.js
CHANGED
|
@@ -506,8 +506,8 @@ export function renderHtmlReport(input) {
|
|
|
506
506
|
Para mantener el orden correcto de PRs apilados, la nueva rama debe crearse desde esa rama.`
|
|
507
507
|
: `No se encontraron otras ramas de la misma cascada. Crea la nueva rama directamente desde la base.`;
|
|
508
508
|
const allBranches = [
|
|
509
|
-
|
|
510
|
-
|
|
509
|
+
{ name: currentBranch, commits: cw.currentBranchCommits, isCurrent: true },
|
|
510
|
+
...cw.siblings
|
|
511
511
|
];
|
|
512
512
|
const cascadeStateHtml = allBranches.map((branch, idx) => {
|
|
513
513
|
const num = idx + 1;
|
|
@@ -521,7 +521,7 @@ export function renderHtmlReport(input) {
|
|
|
521
521
|
<div style="display:flex;align-items:center;gap:6px;margin-bottom:4px">
|
|
522
522
|
<span style="font-size:.75em;font-weight:700;opacity:.5;min-width:22px">#${num}</span>
|
|
523
523
|
<code style="display:inline-block;background:#fff;color:#1e293b;font-size:.8em;font-weight:600;padding:1px 7px;border-radius:4px;letter-spacing:.01em">${esc(branch.name)}</code>
|
|
524
|
-
${branch.isCurrent ? `<span style="font-size:.
|
|
524
|
+
${branch.isCurrent ? `<span style="font-size:.74em;background:#fff;color:#16a34a;font-weight:700;padding:1px 6px;border-radius:4px;border:1px solid #bbf7d0">← rama actual</span>` : ""}
|
|
525
525
|
</div>
|
|
526
526
|
${commitsHtml}
|
|
527
527
|
</div>`;
|
package/package.json
CHANGED