refactor(clone-project): enhance server retrieval by including destinations and filtering out build servers
This commit is contained in:
parent
f9a0ca2ca6
commit
87225405a8
1 changed files with 5 additions and 1 deletions
|
|
@ -54,7 +54,11 @@ public function mount($project_uuid)
|
|||
$this->project = Project::where('uuid', $project_uuid)->firstOrFail();
|
||||
$this->environment = $this->project->environments->where('uuid', $this->environment_uuid)->first();
|
||||
$this->project_id = $this->project->id;
|
||||
$this->servers = currentTeam()->servers;
|
||||
$this->servers = currentTeam()
|
||||
->servers()
|
||||
->with('destinations')
|
||||
->get()
|
||||
->reject(fn ($server) => $server->isBuildServer());
|
||||
$this->newName = str($this->project->name.'-clone-'.(string) new Cuid2)->slug();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue