File tree 2 files changed +10
-3
lines changed
2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -59,7 +59,9 @@ def __init__(
59
59
elif '/api/v3' in base_url :
60
60
# Already in the correct format for REST API
61
61
self .BASE_URL = base_url
62
- self .GRAPHQL_URL = base_url .replace ('/api/v3' , '/api/graphql' )
62
+ # For GitHub Enterprise, GraphQL endpoint should be at /api/graphql
63
+ # But we need to maintain the full path structure
64
+ self .GRAPHQL_URL = f'{ base_url } /graphql'
63
65
else :
64
66
# Assume this is a GitHub Enterprise Server hostname
65
67
# Append /api/v3 for REST API
Original file line number Diff line number Diff line change 1
1
import os
2
2
from typing import Any
3
- from urllib .parse import quote_plus
4
3
5
4
import httpx
6
5
from pydantic import SecretStr
18
17
19
18
20
19
class GitLabService (GitService ):
21
- BASE_URL = 'https://gitlab.com/api/v4'
20
+ DEFAULT_BASE_URL = 'https://gitlab.com/api/v4'
22
21
token : SecretStr = SecretStr ('' )
23
22
refresh = False
24
23
@@ -29,10 +28,16 @@ def __init__(
29
28
external_auth_token : SecretStr | None = None ,
30
29
token : SecretStr | None = None ,
31
30
external_token_manager : bool = False ,
31
+ base_url : str | None = None ,
32
32
):
33
33
self .user_id = user_id
34
34
self .external_token_manager = external_token_manager
35
35
36
+ # Set BASE_URL from parameter or use default
37
+ self .BASE_URL = (
38
+ base_url .strip () if base_url and base_url .strip () else self .DEFAULT_BASE_URL
39
+ )
40
+
36
41
if token :
37
42
self .token = token
38
43
You can’t perform that action at this time.
0 commit comments