INNER CODE UNIT · Python
get_github_installation_service
hunvreus/devpush · app/dependencies.py:39
def get_github_installation_service() -> GitHubInstallationService:
return GitHubInstallationService(get_github_service())
@lru_cache
def get_github_oauth_client() -> OAuth:
settings = get_settings()
oauth = OAuth()
oauth.register(
"github",
client_id=settings.github_app_client_id,
client_secret=settings.github_app_client_secret,
access_token_url="https://github.com/login/oauth/access_token",
authorize_url="https://github.com/login/oauth/authorize",
api_base_url="https://api.github.com/",
client_kwargs={"scope": "user:email"},
)
return oauth