mirror of
https://github.com/karma-riuk/crab.git
synced 2025-07-05 05:28:13 +02:00
now i'm not crashing when no GITHUB_API_TOKEN is
given, rather just printing a warning
This commit is contained in:
@ -487,7 +487,12 @@ if __name__ == "__main__":
|
||||
|
||||
requests_cache.install_cache('github_cache', expire_after=requests_cache.NEVER_EXPIRE)
|
||||
|
||||
g = Github(os.environ["GITHUB_AUTH_TOKEN_CRAB"], seconds_between_requests=0)
|
||||
github_api_token = os.environ.get("GITHUB_AUTH_TOKEN_CRAB")
|
||||
if github_api_token is None:
|
||||
print(
|
||||
"[WARNING] The enviorment variable GITHUB_AUTH_TOKEN_CRAB was not set. This isn't critical, but it will significantly limit the number of GitHub requests this script can make."
|
||||
)
|
||||
g = Github(github_api_token, seconds_between_requests=0)
|
||||
|
||||
docker_client = docker.from_env()
|
||||
move_github_logging_to_file()
|
||||
|
Reference in New Issue
Block a user