@tablation/crew 0.126.0 → 0.126.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.
Files changed (2) hide show
  1. package/dist/cli.js +29 -2
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -18493,6 +18493,20 @@ async function mergeAndRelease(o, decision, fresh, releaseBranch, isolated = fal
18493
18493
  }
18494
18494
  merged.push(c);
18495
18495
  }
18496
+ if (applied > 0 && !o.dryRun && !o.mergeOnly && o.reloadRepo) {
18497
+ const changed2 = gitOk(o.cwd, ["diff", "--name-only", preMerge, "HEAD", "--", ...REPO_CONFIG_FILENAMES]);
18498
+ if (changed2) {
18499
+ try {
18500
+ const next = o.reloadRepo(o.cwd);
18501
+ if (next) {
18502
+ o = { ...o, repo: next };
18503
+ o.emit.emit(`${changed2.split("\n")[0]} changed in this release \u2014 continuing under the merged contract`);
18504
+ }
18505
+ } catch (e) {
18506
+ o.emit.warn(`could not re-read the merged repo config: ${e.message}; releasing under the earlier one`);
18507
+ }
18508
+ }
18509
+ }
18496
18510
  if (o.mergeOnly) {
18497
18511
  o.emit.emit(`merge only: ${merged.length} branch(es) merged, not releasing`);
18498
18512
  return { merged, conflicts, unbuildable, deployed: false, stopped: "merge only", decision };
@@ -18517,7 +18531,8 @@ async function mergeAndRelease(o, decision, fresh, releaseBranch, isolated = fal
18517
18531
  o.emit.emit("nothing to release");
18518
18532
  return { merged, conflicts, unbuildable, deployed: false, stopped: "nothing to release", decision };
18519
18533
  }
18520
- if (merged.length === 0 && decision.unseeded && !o.force) {
18534
+ const waiting = decision.merges.some((c) => c.skipReason === "already-merged" && c.mergedSha);
18535
+ if (merged.length === 0 && decision.unseeded && !waiting && !o.force) {
18521
18536
  o.emit.emit(
18522
18537
  `nothing merged, and ${o.repo.branch.base} carries no release tag to compare against \u2014 nothing to release`
18523
18538
  );
@@ -25828,6 +25843,13 @@ ${changed2.map((c) => ` - ${c}
25828
25843
  const outcome = await runRelease({
25829
25844
  cwd: target.dir,
25830
25845
  repo,
25846
+ reloadRepo: (dir) => resolveRepoConfig(loadRepoConfig(dir), {
25847
+ hooks: { ...c.hooks, ...o?.hooks },
25848
+ labels: { ...c.labels, ...o?.labels },
25849
+ release: mergeRouteRelease(c.release, o?.release),
25850
+ branch: { ...c.branch, ...o?.branch },
25851
+ worktrees: { prefix: shipWorktreePrefixFor(c), nameOverride: o?.worktreeName }
25852
+ }, dir),
25831
25853
  contract: tracker.contract,
25832
25854
  tickets,
25833
25855
  blockerInfo,
@@ -25872,7 +25894,12 @@ ${changed2.map((c) => ` - ${c}
25872
25894
  tracker.contract,
25873
25895
  outcome.stampFrom ?? outcome.decision.lastReleased,
25874
25896
  outcome.decision.head,
25875
- new Map(outcome.merged.map((m) => [m.ticket.issue_id, m.sha]))
25897
+ new Map([
25898
+ // Squashed onto an untagged base by an earlier cycle: no release range
25899
+ // names it, so the first release carries it out here (CREW-2925).
25900
+ ...outcome.decision.merges.filter((m) => m.skipReason === "already-merged" && m.mergedSha).map((m) => [m.ticket.issue_id, m.mergedSha]),
25901
+ ...outcome.merged.map((m) => [m.ticket.issue_id, m.sha])
25902
+ ])
25876
25903
  );
25877
25904
  if (plan.length) await applyStamp(tracker, plan, outcome.version, tracker.contract, remit, dryRun, target.dir);
25878
25905
  } else if (outcome.stopped) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tablation/crew",
3
- "version": "0.126.0",
3
+ "version": "0.126.1",
4
4
  "description": "A standing team of headless agents that picks work off a Tablation board, does it on a machine you control, and reports back.",
5
5
  "type": "module",
6
6
  "license": "MIT",