Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(applications): include pull_request_id in deployment queue check to prevent duplicate deployments

Andras Bacsai22b88d55b36b
diff --git a/bootstrap/helpers/applications.php b/bootstrap/helpers/applications.php
index 3f1e8513c1..919b2bde5d 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();