Update github endpoint

This commit is contained in:
Layla 2020-11-26 00:04:47 -05:00
parent 4273dcfa07
commit 45642a55ac
No known key found for this signature in database
GPG Key ID: A494D9357BA1BE31

View File

@ -14,7 +14,7 @@ def lambda_handler(event, context):
token = secretsmanager.get_secret_value(SecretId=os.environ.get("GITHUB_TOKEN_SECRET")).get("SecretString")
# GitHub client
github = Github(base_url=f"{os.environ.get('GITHUB_HOSTNAME','github.com')}/api/v3", login_or_token=token)
github = Github(base_url=f"https://{os.environ.get('GITHUB_API_ENDPOINT','api.github.com')}", login_or_token=token)
repo = github.get_repo(os.environ.get("REPOSITORY"))