fix(git): apply HTTP transport config to PR checkouts
This commit is contained in:
parent
ffe37fc892
commit
36d44faaf9
2 changed files with 17 additions and 1 deletions
|
|
@ -1821,7 +1821,7 @@ public function generateGitImportCommands(string $deployment_uuid, int $pull_req
|
||||||
} else {
|
} else {
|
||||||
$commands->push("echo 'Checking out $branch'");
|
$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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -118,3 +118,19 @@ public function getAttribute($key)
|
||||||
->not->toContain('mktemp')
|
->not->toContain('mktemp')
|
||||||
->not->toContain('git_retry_dir');
|
->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'");
|
||||||
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue