@tablation/crew 0.49.1 → 0.49.3
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 +28 -4
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -4125,7 +4125,17 @@ function levelRemoteBranch(cwd, remote, branch) {
|
|
|
4125
4125
|
}
|
|
4126
4126
|
const remoteTip2 = gitOk(cwd, ["rev-parse", "-q", "--verify", `refs/remotes/${remote}/${branch}`]);
|
|
4127
4127
|
if (!remoteTip2 || remoteTip2 === local) return { exists: true };
|
|
4128
|
-
if (!isAncestor(cwd, local, remoteTip2))
|
|
4128
|
+
if (!isAncestor(cwd, local, remoteTip2)) {
|
|
4129
|
+
const diverged = !isAncestor(cwd, remoteTip2, local);
|
|
4130
|
+
const holder2 = diverged ? worktrees(cwd).find((w) => w.branch === branch && !w.prunable) : void 0;
|
|
4131
|
+
if (holder2) {
|
|
4132
|
+
return {
|
|
4133
|
+
exists: true,
|
|
4134
|
+
problem: `local ${branch} at ${local.slice(0, 8)} has commits not on ${remote}/${branch} at ${remoteTip2.slice(0, 8)}; worktree ${holder2.path}`
|
|
4135
|
+
};
|
|
4136
|
+
}
|
|
4137
|
+
return { exists: true };
|
|
4138
|
+
}
|
|
4129
4139
|
const holder = worktrees(cwd).find((w) => w.branch === branch && !w.prunable);
|
|
4130
4140
|
if (holder) {
|
|
4131
4141
|
if (gitOk(holder.path, ["status", "--porcelain"])) {
|
|
@@ -9253,10 +9263,10 @@ function movedPast(r, t, branch, pushedAs) {
|
|
|
9253
9263
|
const head = resolve2(r.cwd, branch);
|
|
9254
9264
|
const remoteHead = resolve2(r.cwd, `${r.repo.branch.remote}/${pushedAs}`);
|
|
9255
9265
|
if (remoteHead && !isAncestor(r.cwd, remoteHead, verified) && remoteHead !== head) {
|
|
9256
|
-
return { ticket: t, verified, head: remoteHead };
|
|
9266
|
+
return { ticket: t, verified, head: remoteHead, branch: pushedAs };
|
|
9257
9267
|
}
|
|
9258
9268
|
if (head && head !== verified && !isAncestor(r.cwd, head, verified)) {
|
|
9259
|
-
return { ticket: t, verified, head };
|
|
9269
|
+
return { ticket: t, verified, head, branch: pushedAs };
|
|
9260
9270
|
}
|
|
9261
9271
|
return null;
|
|
9262
9272
|
}
|
|
@@ -9345,6 +9355,12 @@ ${h.prFailure.tail}
|
|
|
9345
9355
|
try {
|
|
9346
9356
|
await tracker.updateTicket(t.id, { [contract.columns.status]: contract.statuses.handoff }, t.updated_at);
|
|
9347
9357
|
await tracker.postEvent(t.id, body, seat, "requeued");
|
|
9358
|
+
await tracker.postEvent(
|
|
9359
|
+
t.id,
|
|
9360
|
+
pushedEventBody(q.head, remote, q.branch),
|
|
9361
|
+
seat,
|
|
9362
|
+
"pushed"
|
|
9363
|
+
);
|
|
9348
9364
|
emit.emit(`returned to ${contract.statuses.handoff} \u2014 branch moved past ${q.verified.slice(0, 8)}`, { ticket: t.issue_id });
|
|
9349
9365
|
} catch (e) {
|
|
9350
9366
|
emit.warn(`could not return to ${contract.statuses.handoff}: ${e.message}`, { ticket: t.issue_id });
|
|
@@ -9778,7 +9794,15 @@ async function runReleaseCycle(o, movedPast2) {
|
|
|
9778
9794
|
const moved = branch ? movedPastVerified(o.cwd, branch, verified) : null;
|
|
9779
9795
|
if (!moved) continue;
|
|
9780
9796
|
drop.add(t.id);
|
|
9781
|
-
|
|
9797
|
+
const remoteTip2 = branch ? gitOk(o.cwd, ["rev-parse", "-q", "--verify", `refs/remotes/${o.repo.branch.remote}/${branch}^{commit}`]) : null;
|
|
9798
|
+
if (remoteTip2 && remoteTip2 !== moved.tip) {
|
|
9799
|
+
o.emit.error(
|
|
9800
|
+
`not releasing ${t.issue_id}: local ${branch} at ${moved.tip.slice(0, 8)} is not on ${o.repo.branch.remote}/${branch} (${remoteTip2.slice(0, 8)}); not requeuing it`,
|
|
9801
|
+
{ ticket: t.issue_id }
|
|
9802
|
+
);
|
|
9803
|
+
continue;
|
|
9804
|
+
}
|
|
9805
|
+
movedPast2.push({ ticket: t, verified: moved.verified, head: moved.tip, branch: pushedBranchForTicket(o.repo, t) });
|
|
9782
9806
|
o.emit.error(
|
|
9783
9807
|
`not releasing ${t.issue_id}: ${branch} is at ${moved.tip.slice(0, 8)}, past the ${moved.verified.slice(0, 8)} QA verified`,
|
|
9784
9808
|
{ ticket: t.issue_id }
|
package/package.json
CHANGED