Switch Gitea connection validation to repository access

This commit is contained in:
Nico Schroeder
2026-03-26 11:16:38 +01:00
parent 92dfe3840c
commit 662bb6e103
7 changed files with 151 additions and 28 deletions
@@ -19,6 +19,16 @@ class GiteaProviderClient implements GitProviderClient
return GitProviderKey::Gitea;
}
public function verifyRepositoryAccess(string $baseUrl, string $token): void
{
$this->request($baseUrl, $token)
->get('/user/repos', [
'limit' => 1,
'page' => 1,
])
->throw();
}
public function getAuthenticatedUser(string $baseUrl, string $token): GitAuthenticatedUser
{
/** @var array{id: int|string, login: string, full_name?: string|null} $payload */