fix: pr build names in case custom name is used

This commit is contained in:
Andras Bacsai 2024-08-15 12:13:29 +02:00
parent 9864d380a3
commit 4b744bc88a

View File

@ -198,7 +198,11 @@ public function __construct(int $application_deployment_queue_id)
$this->container_name = generateApplicationContainerName($this->application, $this->pull_request_id);
if ($this->application->settings->custom_internal_name && ! $this->application->settings->is_consistent_container_name_enabled) {
$this->container_name = $this->application->settings->custom_internal_name;
if ($this->pull_request_id === 0) {
$this->container_name = $this->application->settings->custom_internal_name;
} else {
$this->container_name = "{$this->application->settings->custom_internal_name}-pr-{$this->pull_request_id}";
}
}
ray('New container name: ', $this->container_name);