Update src/Appwrite/Platform/Modules/Functions/Workers/Builds.php

Co-authored-by: Matej Bačo <matejbacocom@gmail.com>
This commit is contained in:
Khushboo Verma 2025-05-28 14:02:03 +05:30 committed by GitHub
parent aa07ba0027
commit 707ef16f79
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1135,7 +1135,7 @@ class Builds extends Action
$branchPrefix = substr($branchName, 0, 16);
if (strlen($branchName) > 16) {
$remainingChars = substr($branchName, 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}";