@tablation/crew 0.71.0 → 0.71.1
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 +26 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10643,6 +10643,28 @@ function heldByBlockers(tickets, verifiedStatus, info) {
|
|
|
10643
10643
|
}
|
|
10644
10644
|
var describeHeld = (held) => held.map((h) => `${h.ticket.issue_tag ?? h.ticket.issue_id} held: blocked by ${h.blockers}`);
|
|
10645
10645
|
var CHANGELOG_LINE = /^Changelog:[ \t]*(.*)$/gm;
|
|
10646
|
+
var TICKET_REF_AT_START = /^([A-Z][A-Z0-9]*)-(\d+)\b/;
|
|
10647
|
+
function dedupeChangelogEntries(entries, ticket) {
|
|
10648
|
+
const own = (ticket.issue_tag ?? ticket.issue_id).match(/^([A-Z][A-Z0-9]*)-(\d+)$/);
|
|
10649
|
+
const seen = /* @__PURE__ */ new Set();
|
|
10650
|
+
const out = [];
|
|
10651
|
+
for (const raw of entries) {
|
|
10652
|
+
let line = raw.trim();
|
|
10653
|
+
const ref = line.match(TICKET_REF_AT_START);
|
|
10654
|
+
let key = line;
|
|
10655
|
+
if (ref) {
|
|
10656
|
+
const prefix = ref[1];
|
|
10657
|
+
const num = ref[2];
|
|
10658
|
+
const canonical = own && own[2] === num ? own[1] : prefix;
|
|
10659
|
+
line = `${canonical}-${num}${line.slice(ref[0].length)}`;
|
|
10660
|
+
key = `${canonical}-${num}`;
|
|
10661
|
+
}
|
|
10662
|
+
if (seen.has(key)) continue;
|
|
10663
|
+
seen.add(key);
|
|
10664
|
+
out.push(line);
|
|
10665
|
+
}
|
|
10666
|
+
return out;
|
|
10667
|
+
}
|
|
10646
10668
|
var BUMP_LINE = /^Bump:[ \t]*(major|minor|patch)\b/gim;
|
|
10647
10669
|
function planMerge(cwd, tickets, contract, lastReleased, branchFor = (t) => branchForIssue(cwd, t.issue_id), base = "main", blockerInfo) {
|
|
10648
10670
|
const held = new Set(heldByBlockers(tickets, contract.statuses.verified, blockerInfo).map((h) => h.ticket.id));
|
|
@@ -10701,7 +10723,10 @@ function planMerge(cwd, tickets, contract, lastReleased, branchFor = (t) => bran
|
|
|
10701
10723
|
};
|
|
10702
10724
|
}
|
|
10703
10725
|
const bodies = commitBodies(cwd, `${base}..${branch}`);
|
|
10704
|
-
const entries =
|
|
10726
|
+
const entries = dedupeChangelogEntries(
|
|
10727
|
+
[...bodies.matchAll(CHANGELOG_LINE)].map((m) => m[1].trim()).filter(Boolean),
|
|
10728
|
+
ticket
|
|
10729
|
+
);
|
|
10705
10730
|
const usedFallback = entries.length === 0;
|
|
10706
10731
|
const { size, majorRequested } = requestedBump(bodies);
|
|
10707
10732
|
return {
|
package/package.json
CHANGED