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

#1986 seems to break setting GitHub base URL #2420

Closed
bluek1te opened this issue Feb 14, 2023 · 2 comments · Fixed by #2425
Closed

#1986 seems to break setting GitHub base URL #2420

bluek1te opened this issue Feb 14, 2023 · 2 comments · Fixed by #2425

Comments

@bluek1te
Copy link
Contributor

#1986 seems to break setting base URL.

What I did:

auth = AppAuthentication(int(os.getenv("GITHUB_APP_ID")),
                         t,
                         int(os.getenv("GITHUB_APP_INSTALLATION_ID")))
g = Github(base_url="https://test.somegit.com/api/v3", app_auth=auth)

When I turn on debugger, the base URL for requester seems to be set to api.github.com. Lmk if I am doing something wrong here, thanks!

@EnricoMi
Copy link
Collaborator

Looks like the Requester does not pass the base url to GithubIntegration:

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
)

def __init__(
self,
integration_id,
private_key,
base_url=Consts.DEFAULT_BASE_URL,
jwt_expiry=Consts.DEFAULT_JWT_EXPIRY,
jwt_issued_at=Consts.DEFAULT_JWT_ISSUED_AT,
):

@dblanchette

@bluek1te
Copy link
Contributor Author

bluek1te commented Feb 16, 2023

I took a stab at it (big thanks for the feature add from #1986 btw): #2425

bluek1te added a commit to bluek1te/PyGithub that referenced this issue Feb 20, 2023
EnricoMi added a commit that referenced this issue Feb 23, 2023
Pass requester base URL to integration (#2420)
@EnricoMi EnricoMi added this to the Version 1.58.1 milestone Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants