Refactor repository selection logic in GithubPrivateRepository.php

This commit is contained in:
Andras Bacsai 2024-03-05 09:58:02 +01:00
parent 4d72787c83
commit 6027bee3b8

View File

@ -81,7 +81,7 @@ public function loadRepositories($github_app_id)
}
$this->repositories = $this->repositories->sortBy('name');
if ($this->repositories->count() > 0) {
$this->selected_repository_id = data_get($this->repositories,'0.id');
$this->selected_repository_id = data_get($this->repositories->first(), 'id');
}
$this->current_step = 'repository';
}