Sync GithubIntegration __init__ arguments with github.Github (#2556)

Github and GithubIntegration now both support the same (full) set of Requester arguments.
Creating a Github instance for a Github App Installation coming from GithubIntegration uses the same
Requester arguments (except for auth).
This commit is contained in:
Enrico Minack
2023-06-21 09:04:19 +02:00
committed by GitHub
parent f4e9dcb341
commit ea45237d3b
16 changed files with 333 additions and 27 deletions
+10
View File
@@ -1,5 +1,8 @@
from typing import Union, Optional, Dict
from urllib3 import Retry
import github
from github.Auth import AppAuth
from github.Installation import Installation
from github.InstallationAuthorization import InstallationAuthorization
@@ -15,11 +18,18 @@ class GithubIntegration:
integration_id: Optional[Union[int, str]] = ...,
private_key: Optional[str] = ...,
base_url: str = ...,
timeout: int = ...,
user_agent: str = ...,
per_page: int = ...,
verify: Union[bool, str] = ...,
retry: Optional[Union[int, Retry]] = ...,
pool_size: Optional[int] = ...,
jwt_expiry: int = ...,
jwt_issued_at: int = ...,
jwt_algorithm: str = ...,
auth: Optional[AppAuth] = ...,
) -> None: ...
def get_github_for_installation(self, installation_id: int) -> github.Github: ...
def _get_installed_app(self, url: str) -> Installation: ...
def _get_headers(self) -> Dict[str, str]: ...
def create_jwt(self, expiration: Optional[int] = ...) -> str: ...