fix: if public repository does not have a main branch
This commit is contained in:
@@ -76,13 +76,14 @@ class PublicGitRepository extends Component
|
|||||||
$this->get_branch();
|
$this->get_branch();
|
||||||
$this->selected_branch = $this->git_branch;
|
$this->selected_branch = $this->git_branch;
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
return handleError($e, $this);
|
if (!$this->branch_found && $this->git_branch == 'main') {
|
||||||
}
|
try {
|
||||||
if (!$this->branch_found && $this->git_branch == 'main') {
|
$this->git_branch = 'master';
|
||||||
try {
|
$this->get_branch();
|
||||||
$this->git_branch = 'master';
|
} catch (\Throwable $e) {
|
||||||
$this->get_branch();
|
return handleError($e, $this);
|
||||||
} catch (\Throwable $e) {
|
}
|
||||||
|
} else {
|
||||||
return handleError($e, $this);
|
return handleError($e, $this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user