π OpenHands: AI-Driven Development
feat: allow optional HTTP protocol for self-hosted GitLab instances (#9757)
Yumi Izumi402b6224a601
diff --git a/openhands/integrations/gitlab/gitlab_service.py b/openhands/integrations/gitlab/gitlab_service.pyindex 34916da404..a681f36279 100644--- a/openhands/integrations/gitlab/gitlab_service.py+++ b/openhands/integrations/gitlab/gitlab_service.py@@ -56,8 +56,15 @@ class GitLabService(BaseGitService, GitService):self.token = tokenif base_domain:- self.BASE_URL = f'https://{base_domain}/api/v4'- self.GRAPHQL_URL = f'https://{base_domain}/api/graphql'+ # Check if protocol is already included+ if base_domain.startswith(('http://', 'https://')):+ # Use the provided protocol+ self.BASE_URL = f'{base_domain}/api/v4'+ self.GRAPHQL_URL = f'{base_domain}/api/graphql'+ else:+ # Default to https if no protocol specified+ self.BASE_URL = f'https://{base_domain}/api/v4'+ self.GRAPHQL_URL = f'https://{base_domain}/api/graphql'@propertydef provider(self) -> str: