Factory: close finished issues, Done column on the right

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Richard ZinkandClaude Sonnet 5.5 committed 2026-11-16 13:41:58 +01:00
1 parent fcbc052f8e
commit df02556132
8 files changed
+90 -5

No files matched your search

+22 -1
View File
@@ -118,8 +118,8 @@ const COLUMNS: { id: string; states: string[] }[] = [
{ id: "approved", states: ["approved"] },
{ id: "build", states: ["building", "rework"] },
{ id: "qa", states: ["qa", "testing"] },
{ id: "done", states: ["done"] },
{ id: "failed", states: ["failed", "rejected"] },
{ id: "done", states: ["done"] },
];
const KIND_NAME: Record<string, string> = { gitea: "Gitea", github: "GitHub", gitlab: "GitLab" };
@@ -324,6 +324,22 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
setBusy(false);
}
};
const closeIssue = async () => {
if (!selected) return;
const comment = await promptDialog({ title: t("factory.closeTitle"), message: t("factory.closeMsg", { n: selected.number }), defaultValue: t("factory.closeDefault"), confirmLabel: t("factory.close") });
if (comment === null) return;
setBusy(true);
try {
await post("/factory/issues/close", { repo: selected.repo, number: selected.number, comment });
toast(t("factory.closed"), "success");
setSel("");
await reload();
} catch (e: any) {
toast(e.message);
} finally {
setBusy(false);
}
};
const phaseRunning = !!selected && ["review", "building", "testing"].includes(selected.state);
return (
@@ -452,6 +468,11 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
</button>
</>
)}
{selected && selected.state === "done" && (
<button className="small" onClick={closeIssue} disabled={busy}>
<Icon name="check" /> {t("factory.close")}
</button>
)}
{selected && (
<>
<a className="small ghost button-link" href={issueUrl(selected.repo, selected.number)} target="_blank" rel="noreferrer">