mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 07:18:10 -05:00
fix: can't add gitlab personal access token and add more debug log in validate_provider_token (#8782)
This commit is contained in:
@@ -167,10 +167,14 @@ class GitLabService(BaseGitService, GitService):
|
||||
url = f'{self.BASE_URL}/user'
|
||||
response, _ = await self._make_request(url)
|
||||
|
||||
# Use a default avatar URL if not provided
|
||||
# In some self-hosted GitLab instances, the avatar_url field may be returned as None.
|
||||
avatar_url = response.get('avatar_url') or ''
|
||||
|
||||
return User(
|
||||
id=response.get('id'),
|
||||
username=response.get('username'),
|
||||
avatar_url=response.get('avatar_url'),
|
||||
avatar_url=avatar_url,
|
||||
name=response.get('name'),
|
||||
email=response.get('email'),
|
||||
company=response.get('organization'),
|
||||
|
||||
Reference in New Issue
Block a user