fix: sentry bug
This commit is contained in:
parent
71e1571c39
commit
66162966b9
@ -39,7 +39,7 @@ class PublicGitRepository extends Component
|
||||
'publish_directory' => 'publish directory',
|
||||
];
|
||||
private object $repository_url_parsed;
|
||||
private GithubApp|GitlabApp $git_source;
|
||||
private GithubApp|GitlabApp|null $git_source = null;
|
||||
private string $git_host;
|
||||
private string $git_repository;
|
||||
|
||||
@ -67,18 +67,17 @@ public function instantSave()
|
||||
|
||||
public function load_branch()
|
||||
{
|
||||
$this->branch_found = false;
|
||||
try {
|
||||
$this->branch_found = false;
|
||||
$this->validate([
|
||||
'repository_url' => 'required|url'
|
||||
]);
|
||||
$this->get_git_source();
|
||||
try {
|
||||
$this->get_branch();
|
||||
$this->selected_branch = $this->git_branch;
|
||||
$this->get_branch();
|
||||
$this->selected_branch = $this->git_branch;
|
||||
} catch (\Exception $e) {
|
||||
return general_error_handler(err: $e, that: $this);
|
||||
}
|
||||
|
||||
if (!$this->branch_found && $this->git_branch == 'main') {
|
||||
try {
|
||||
$this->git_branch = 'master';
|
||||
@ -103,6 +102,9 @@ private function get_git_source()
|
||||
} elseif ($this->git_host == 'bitbucket.org') {
|
||||
// Not supported yet
|
||||
}
|
||||
if (is_null($this->git_source)) {
|
||||
throw new \Exception('Git source not found. What?!');
|
||||
}
|
||||
}
|
||||
|
||||
private function get_branch()
|
||||
|
@ -1,10 +1,10 @@
|
||||
{
|
||||
"coolify": {
|
||||
"main": {
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.22"
|
||||
"coolify": {
|
||||
"main": {
|
||||
"version": "3.12.36"
|
||||
},
|
||||
"v4": {
|
||||
"version": "4.0.0-beta.22"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user