From 3afc8a1b9c0db828a73ecd535f9a5714c8439c58 Mon Sep 17 00:00:00 2001 From: javiservices Date: Thu, 18 Jun 2026 12:18:23 +0200 Subject: [PATCH] fix(deploy): substr offset 11 (refs/heads/ tiene 11 chars) --- app/Http/Controllers/WebhookController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/WebhookController.php b/app/Http/Controllers/WebhookController.php index aaa6213..e75155a 100644 --- a/app/Http/Controllers/WebhookController.php +++ b/app/Http/Controllers/WebhookController.php @@ -30,7 +30,7 @@ public function deploy(Request $r): JsonResponse { $payload = json_decode($body, true) ?: []; $ref = $payload['ref'] ?? ''; - $branch = str_starts_with($ref, 'refs/heads/') ? substr($ref, 10) : 'main'; + $branch = str_starts_with($ref, 'refs/heads/') ? substr($ref, 11) : 'main'; if (! in_array($branch, ['main', 'master'], true)) { Log::info("[webhook] push a '$branch' ignorado");