From 36d44faaf988e31acba9b8a8b258c2ce2185f343 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Wed, 3 Jun 2026 12:59:45 +0200 Subject: [PATCH] fix(git): apply HTTP transport config to PR checkouts --- app/Models/Application.php | 2 +- tests/Feature/GitHttpTransportCommandsTest.php | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/app/Models/Application.php b/app/Models/Application.php index 03d177ac7..3ad167887 100644 --- a/app/Models/Application.php +++ b/app/Models/Application.php @@ -1821,7 +1821,7 @@ class Application extends BaseModel } else { $commands->push("echo 'Checking out $branch'"); } - $git_clone_command = "{$git_clone_command} && cd {$escapedBaseDir} && GIT_SSH_COMMAND=\"{$otherSshCommand}\" ".$this->buildGitCheckoutCommand($commit, $otherSshCommand); + $git_clone_command = "{$git_clone_command} && cd {$escapedBaseDir} && GIT_SSH_COMMAND=\"{$otherSshCommand}\" ".$this->buildGitCheckoutCommand($commit, $otherSshCommand, $gitConfigOptions); } } diff --git a/tests/Feature/GitHttpTransportCommandsTest.php b/tests/Feature/GitHttpTransportCommandsTest.php index f5ef6ade5..d6f9f1337 100644 --- a/tests/Feature/GitHttpTransportCommandsTest.php +++ b/tests/Feature/GitHttpTransportCommandsTest.php @@ -118,3 +118,19 @@ it('supports dedicated checkout directories for compose file loading', function ->not->toContain('mktemp') ->not->toContain('git_retry_dir'); }); + +it('applies http 1 transport to custom bitbucket pull request checkout', function () { + $application = applicationWithGitSettings(); + $application->git_repository = 'https://bitbucket.org/coollabsio/private-app.git'; + + $result = $application->generateGitImportCommands( + deployment_uuid: 'test-deployment', + pull_request_id: 123, + git_type: 'bitbucket', + exec_in_docker: false, + commit: 'abc123def456abc123def456abc123def456abc1', + ); + + expect($result['commands']) + ->toContain("git -c http.version=HTTP/1.1 checkout 'abc123def456abc123def456abc123def456abc1'"); +});