From 009996198ba34fd8405c47664f1abdebb121f8ac Mon Sep 17 00:00:00 2001 From: Jack Grigg Date: Fri, 7 May 2021 12:19:04 +1200 Subject: [PATCH] Take API tokens as environment variables --- zcash-core-graph.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/zcash-core-graph.py b/zcash-core-graph.py index bfb9e394..6d5cda64 100755 --- a/zcash-core-graph.py +++ b/zcash-core-graph.py @@ -16,8 +16,8 @@ from sgqlc.endpoint.http import HTTPEndpoint from sgqlc.operation import Operation from github_schema import github_schema as schema -GITHUB_TOKEN = None -ZENHUB_TOKEN = None +GITHUB_TOKEN = os.environ.get('GITHUB_TOKEN') +ZENHUB_TOKEN = os.environ.get('ZENHUB_TOKEN') REPOS = { 26987049: ('zcash', 'zcash'), @@ -220,4 +220,4 @@ if __name__ == '__main__': if GITHUB_TOKEN and ZENHUB_TOKEN: main() else: - print('Please edit the script to add GitHub and ZenHub API tokens.') + print('Please set the GITHUB_TOKEN and ZENHUB_TOKEN environment variables.')