From 9e717ec1191aa9915dfbbcf116a225c91e346eed Mon Sep 17 00:00:00 2001 From: Paul Makles Date: Mon, 9 Feb 2026 19:42:06 +0000 Subject: [PATCH] =?UTF-8?q?Revert=20"feat:=20delete=20OpenProject=20ticket?= =?UTF-8?q?s=20when=20creation=20criteria=20is=20no=E2=80=A6=20(#2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Revert "feat: delete OpenProject tickets when creation criteria is no longer satisfied (#1)" This reverts commit 46ba6d753a63efd28be491202965c0cd074a4b60. --- main.ts | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/main.ts b/main.ts index 7afe0a4..c7de591 100644 --- a/main.ts +++ b/main.ts @@ -111,28 +111,6 @@ if (import.meta.main) { // (2) create or update if (existingTask) { - // Delete task if owner is no longer mapped - if (!ASSIGNEES[ticket.owner_id]) { - console.info( - `Deleting task ${existingTask.id} - owner ${ticket.owner_id} is not mapped.` - ); - - await fetch( - `${OP_URL}/api/v3/work_packages/${existingTask.id}`, - { - method: "DELETE", - headers: { - Authorization: "Basic " + btoa("apikey:" + OP_TOKEN), - }, - } - ).then((r) => { - if (!r.ok) throw new Error(`Delete failed with status ${r.status}`); - }); - - console.info("Deleted task successfully."); - return new Response(null, { status: 200 }); - } - // update existing task await fetch( `${OP_URL}/api/v3/work_packages/${existingTask.id}?notify=false`,