fix: use commit hash on webhooks

This commit is contained in:
Andras Bacsai
2024-05-15 10:44:45 +02:00
parent 0ffba45517
commit 1e09b2bbd8
4 changed files with 10 additions and 1 deletions

View File

@@ -47,7 +47,7 @@ class Bitbucket extends Controller
if ($x_bitbucket_event === 'repo:push') {
$branch = data_get($payload, 'push.changes.0.new.name');
$full_name = data_get($payload, 'repository.full_name');
$commit = data_get($payload, 'push.changes.0.new.target.hash');
if (!$branch) {
return response([
'status' => 'failed',
@@ -104,6 +104,7 @@ class Bitbucket extends Controller
queue_application_deployment(
application: $application,
deployment_uuid: $deployment_uuid,
commit: $commit,
force_rebuild: false,
is_webhook: true
);