Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass requester base URL to integration (#2420) #2425

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 4 additions & 2 deletions github/Requester.py
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ def __init__(

self.__installation_authorization = None
self.__app_auth = app_auth
self.__base_url = base_url

self.__auth_lock = RLock()

Expand All @@ -333,7 +334,6 @@ def __init__(
else:
self.__authorizationHeader = None

self.__base_url = base_url
o = urllib.parse.urlparse(base_url)
self.__hostname = o.hostname
self.__port = o.port
Expand Down Expand Up @@ -375,7 +375,9 @@ def _must_refresh_token(self) -> bool:
def _get_installation_authorization(self):
assert self.__app_auth is not None
integration = GithubIntegration.GithubIntegration(
self.__app_auth.app_id, self.__app_auth.private_key
self.__app_auth.app_id,
self.__app_auth.private_key,
base_url=self.__base_url,
)
return integration.get_access_token(
self.__app_auth.installation_id,
Expand Down