Factory: exact parallel limit, remove issues from the board
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
aa6ee7fd31
commit
486c49d50b
8 files changed
+76
-1
No files matched your search
@@ -348,6 +348,20 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
||||
setBusy(false);
|
||||
}
|
||||
};
|
||||
const removeIssue = async () => {
|
||||
if (!selected) return;
|
||||
if (!(await confirmDialog({ message: t("factory.removeConfirm", { n: selected.number }), confirmLabel: t("factory.remove"), danger: true }))) return;
|
||||
setBusy(true);
|
||||
try {
|
||||
await post("/factory/issues/remove", { repo: selected.repo, number: selected.number });
|
||||
setSel("");
|
||||
await reload();
|
||||
} catch (e: any) {
|
||||
toast(e.message);
|
||||
} finally {
|
||||
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") });
|
||||
@@ -503,6 +517,11 @@ function FactoryOverview({ onSettings }: { onSettings: () => void }) {
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
{selected && !["review", "building", "testing"].includes(selected.state) && (
|
||||
<button className="small" onClick={removeIssue} disabled={busy} title={t("factory.removeHint")}>
|
||||
<Icon name="trash" /> {t("factory.remove")}
|
||||
</button>
|
||||
)}
|
||||
{selected && selected.state === "done" && (
|
||||
<button className="small" onClick={closeIssue} disabled={busy}>
|
||||
<Icon name="check" /> {t("factory.close")}
|
||||
|
||||
Reference in new issue
Block a user