Take API tokens as environment variables

This commit is contained in:
Jack Grigg 2021-05-07 12:19:04 +12:00
parent 4690a7220a
commit 009996198b
1 changed files with 3 additions and 3 deletions

View File

@ -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.')