diff --git a/auth.py b/auth.py index 6d848d1..840d4eb 100644 --- a/auth.py +++ b/auth.py @@ -69,7 +69,7 @@ def get_github_app_installation_token( str: the GitHub App token """ jwt_headers = github3.apps.create_jwt_headers(gh_app_private_key_bytes, gh_app_id) - api_endpoint = f"{ghe}/api/v3" if ghe else "api.github.com" + api_endpoint = f"{ghe}/api/v3" if ghe else "https://api.github.com" url = f"{api_endpoint}/app/installations/{gh_app_installation_id}/access_tokens" try: diff --git a/contributor_stats.py b/contributor_stats.py index 4f553f0..7ddb36d 100644 --- a/contributor_stats.py +++ b/contributor_stats.py @@ -153,10 +153,10 @@ def get_sponsor_information(contributors: list, token: str, ghe: str) -> list: variables = {"username": contributor.username} # Send the GraphQL request - api_endpoint = f"{ghe}/api/v3" if ghe else "api.github.com" + api_endpoint = f"{ghe}/api/v3" if ghe else "https://api.github.com" headers = {"Authorization": f"Bearer {token}"} response = requests.post( - f"https://{api_endpoint}/graphql", + f"{api_endpoint}/graphql", json={"query": query, "variables": variables}, headers=headers, timeout=60,