@tablation/crew 0.49.0 → 0.49.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 +10 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -8691,8 +8691,13 @@ ${v.reason[0].toUpperCase()}${v.reason.slice(1)}. Set back to \`in_progress\`, s
|
|
|
8691
8691
|
async function enforceHandoff(i) {
|
|
8692
8692
|
try {
|
|
8693
8693
|
const t = await i.writer.ticket(i.ticketId);
|
|
8694
|
-
|
|
8694
|
+
const st = i.contract.statuses;
|
|
8695
8695
|
const log = { ticket: t.issue_id, step: "handoff" };
|
|
8696
|
+
const claimed = [st.verifying, st.verified, st.deployed].some((s) => s && t.status === s);
|
|
8697
|
+
if (t.status !== st.handoff && !claimed) {
|
|
8698
|
+
i.log.emit(`${t.issue_id} is at ${t.status}, not handed off \u2014 nothing to check`, log);
|
|
8699
|
+
return { kind: "not-handed-off" };
|
|
8700
|
+
}
|
|
8696
8701
|
const v = inspectHandoff(i.dir, i.cfg, t, i.role);
|
|
8697
8702
|
if (v.kind === "unverified") {
|
|
8698
8703
|
i.log.warn(`${t.issue_id} is at ${t.status} but the push was not checked: ${v.why}`, log);
|
|
@@ -8703,6 +8708,10 @@ async function enforceHandoff(i) {
|
|
|
8703
8708
|
i.log.emit(`${t.issue_id} pushed at ${v.sha.slice(0, 7)} \u2014 handed on to QA`, log);
|
|
8704
8709
|
return { kind: "pushed", sha: v.sha };
|
|
8705
8710
|
}
|
|
8711
|
+
if (claimed) {
|
|
8712
|
+
i.log.warn(`${t.issue_id} is at ${t.status} but its branch is not on the remote at HEAD: ${v.reason}`, log);
|
|
8713
|
+
return { kind: "failed", why: v.reason };
|
|
8714
|
+
}
|
|
8706
8715
|
const heldBy = i.hold ? t[i.hold.column] : void 0;
|
|
8707
8716
|
await i.writer.updateTicket(t.id, {
|
|
8708
8717
|
status: i.contract.statuses.building,
|
package/package.json
CHANGED