@biffo/cli 0.228.9 → 0.228.10
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 +16 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3485,10 +3485,25 @@ function readCarriedPrs(templateRepo, from, to) {
|
|
|
3485
3485
|
return [];
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
3488
|
+
var COMMIT_BODY_MAX_LINE = 100;
|
|
3488
3489
|
function carriedPrsSection(carriedPrs) {
|
|
3489
3490
|
if (carriedPrs.length === 0) return [];
|
|
3490
3491
|
const unique = [...new Set(carriedPrs)].sort((a, b) => a - b);
|
|
3491
|
-
|
|
3492
|
+
const single = `<!-- ${CARRIED_PRS_MARKER}${unique.join(",")} -->`;
|
|
3493
|
+
if (single.length <= COMMIT_BODY_MAX_LINE) return ["", single];
|
|
3494
|
+
const lines = [`<!-- ${CARRIED_PRS_MARKER}`];
|
|
3495
|
+
let current = "";
|
|
3496
|
+
for (const n of unique) {
|
|
3497
|
+
const token = `${n},`;
|
|
3498
|
+
if (current.length + token.length > COMMIT_BODY_MAX_LINE) {
|
|
3499
|
+
lines.push(current);
|
|
3500
|
+
current = "";
|
|
3501
|
+
}
|
|
3502
|
+
current += token;
|
|
3503
|
+
}
|
|
3504
|
+
lines.push(current.replace(/,$/, ""));
|
|
3505
|
+
lines.push("-->");
|
|
3506
|
+
return ["", ...lines];
|
|
3492
3507
|
}
|
|
3493
3508
|
function buildCommitMessage(from, to, carriedPrs) {
|
|
3494
3509
|
const subject = `chore(core): upgrade template core ${from} -> ${to}`;
|