fix: can't add gitlab personal access token and add more debug log in validate_provider_token (#8782)

This commit is contained in:
baii
2025-06-03 23:57:04 +08:00
committed by GitHub
parent 633d5b26d0
commit b706f59cfd
5 changed files with 22 additions and 5 deletions

View File

@@ -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'),