Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: peaklabs-dev <122374094+peaklabs-dev@users.noreply.github.com>
Co-authored-by: Aditya Tripathi <aditya@climactic.co>
This commit is contained in:
Andras Bacsai
2026-11-06 14:25:02 +01:00
committed by GitHub
co-authored by Claude Opus 5.5 peaklabs-dev Aditya Tripathi
parent b7dc2e435b
commit 033f0c84da
581 changed files with 58626 additions and 2456 deletions
@@ -8,6 +8,7 @@ use App\Actions\Service\StartService;
use App\Enums\ApplicationDeploymentStatus;
use App\Enums\CancelPreviousDeployments;
use App\Http\Controllers\Controller;
use App\Jobs\SyncGithubDeploymentJob;
use App\Models\Application;
use App\Models\ApplicationDeploymentQueue;
use App\Models\ApplicationPreview;
@@ -278,6 +279,13 @@ class DeployController extends Controller
$deployment->status = ApplicationDeploymentStatus::CANCELLED_BY_USER->value;
$cancelled = true;
try {
// The query update above fires no model event.
SyncGithubDeploymentJob::dispatchFor($deployment);
} catch (\Throwable $e) {
\Log::warning("Failed to queue the GitHub deployment sync for cancelled deployment {$deployment->id}: {$e->getMessage()}");
}
try {
$deployment->addLogEntry('Deployment cancelled by user via API.', 'stderr');
CleanupCancelledDeployment::run($deployment, (int) $teamId);