From a10e51b2c41d5d25a14e7efb7135ca53dc7bddc9 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Fri, 5 Sep 2025 17:50:33 +0200 Subject: [PATCH] fix(webhook): replace delete with forceDelete for application previews to ensure immediate removal --- app/Http/Controllers/Webhook/Github.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Webhook/Github.php b/app/Http/Controllers/Webhook/Github.php index dd35a17dd..82719429f 100644 --- a/app/Http/Controllers/Webhook/Github.php +++ b/app/Http/Controllers/Webhook/Github.php @@ -240,7 +240,7 @@ class Github extends Controller if ($action === 'closed') { $found = ApplicationPreview::where('application_id', $application->id)->where('pull_request_id', $pull_request_id)->first(); if ($found) { - $found->delete(); + $found->forceDelete(); $container_name = generateApplicationContainerName($application, $pull_request_id); instant_remote_process(["docker rm -f $container_name"], $application->destination->server); $return_payloads->push([ @@ -480,7 +480,7 @@ class Github extends Controller } ApplicationPullRequestUpdateJob::dispatchSync(application: $application, preview: $found, status: ProcessStatus::CLOSED); - $found->delete(); + $found->forceDelete(); $return_payloads->push([ 'application' => $application->name,