Update app/controllers/api/vcs.php

Co-authored-by: Matej Bačo <matejbacocom@gmail.com>
This commit is contained in:
Khushboo Verma
2025-05-28 14:01:55 +05:30
committed by GitHub
parent 66ac440f9d
commit aa07ba0027
+1 -1
View File
@@ -296,7 +296,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
$branchPrefix = substr($providerBranch, 0, 16);
if (strlen($providerBranch) > 16) {
$remainingChars = substr($providerBranch, 16);
$branchPrefix .= substr(hash('sha256', $remainingChars), 0, 7);
$branchPrefix .= '-' . substr(hash('sha256', $remainingChars), 0, 7);
}
$resourceProjectHash = substr(hash('sha256', $resource->getId() . $project->getId()), 0, 7);
$domain = "branch-{$branchPrefix}-{$resourceProjectHash}.{$sitesDomain}";