asdasd
This commit is contained in:
@@ -173,6 +173,7 @@ final class GiteaDeployStatusService
|
|||||||
return array_values($configured);
|
return array_values($configured);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$repositories = [];
|
||||||
$owner = trim((string) ($this->config['owner'] ?? ''));
|
$owner = trim((string) ($this->config['owner'] ?? ''));
|
||||||
|
|
||||||
if ($owner !== '') {
|
if ($owner !== '') {
|
||||||
@@ -182,9 +183,8 @@ final class GiteaDeployStatusService
|
|||||||
] as $path) {
|
] as $path) {
|
||||||
try {
|
try {
|
||||||
$payload = $this->requestJson($path);
|
$payload = $this->requestJson($path);
|
||||||
$repositories = $this->normalizeRepositoriesPayload($payload);
|
foreach ($this->normalizeRepositoriesPayload($payload) as $repository) {
|
||||||
if ($repositories !== []) {
|
$repositories[$repository['full_name']] = $repository;
|
||||||
return $repositories;
|
|
||||||
}
|
}
|
||||||
} catch (\Throwable) {
|
} catch (\Throwable) {
|
||||||
continue;
|
continue;
|
||||||
@@ -193,13 +193,15 @@ final class GiteaDeployStatusService
|
|||||||
}
|
}
|
||||||
|
|
||||||
$payload = $this->requestJson('/user/repos?limit=100&page=1');
|
$payload = $this->requestJson('/user/repos?limit=100&page=1');
|
||||||
$repositories = $this->normalizeRepositoriesPayload($payload);
|
foreach ($this->normalizeRepositoriesPayload($payload) as $repository) {
|
||||||
|
$repositories[$repository['full_name']] = $repository;
|
||||||
|
}
|
||||||
|
|
||||||
if ($repositories === []) {
|
if ($repositories === []) {
|
||||||
throw new \RuntimeException('Keine Repositories fuer den Gitea-Status gefunden.');
|
throw new \RuntimeException('Keine Repositories fuer den Gitea-Status gefunden.');
|
||||||
}
|
}
|
||||||
|
|
||||||
return $repositories;
|
return array_values($repositories);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user