Switch Gitea connection validation to repository access
This commit is contained in:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user