Merge pull request #11732 from appwrite/claude/add-deployment-hook-method-prkpM

Add beforeCreateGitDeployment hook for deployment validation
This commit is contained in:
Damodar Lohani
2026-04-01 08:27:50 +05:45
committed by GitHub
@@ -70,6 +70,8 @@ trait Deployment
throw new Exception(Exception::PROJECT_NOT_FOUND, 'Repository references non-existent project');
}
$this->beforeCreateGitDeployment($project, $repository, $dbForPlatform, $authorization);
try {
$dsn = new DSN($project->getAttribute('database'));
$databaseName = $dsn->getHost();
@@ -561,6 +563,10 @@ trait Deployment
}
}
protected function beforeCreateGitDeployment(Document $project, Document $repository, Database $dbForPlatform, Authorization $authorization): void
{
}
protected function getBuildQueueName(Document $project, Database $dbForPlatform, Authorization $authorization): string
{
return System::getEnv('_APP_BUILDS_QUEUE_NAME', Event::BUILDS_QUEUE_NAME);