From 22b88d55b36b428184a63cd876d46ea4a54e4d16 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 30 Apr 2025 15:28:47 +0200 Subject: [PATCH] fix(applications): include pull_request_id in deployment queue check to prevent duplicate deployments --- bootstrap/helpers/applications.php | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.php index 3f1e8513c..919b2bde5 100644 --- a/bootstrap/helpers/applications.php +++ b/bootstrap/helpers/applications.php @@ -28,6 +28,7 @@ function queue_application_deployment(Application $application, string $deployme // Check if there's already a deployment in progress or queued for this application and commit $existing_deployment = ApplicationDeploymentQueue::where('application_id', $application_id) ->where('commit', $commit) + ->where('pull_request_id', $pull_request_id) ->whereIn('status', [ApplicationDeploymentStatus::IN_PROGRESS->value, ApplicationDeploymentStatus::QUEUED->value]) ->first();