Update token call
This commit is contained in:
@@ -7,9 +7,13 @@ from github import Github
|
|||||||
|
|
||||||
def read_token():
|
def read_token():
|
||||||
token_file = Path(os.getcwd(), 'tests', 'token.txt')
|
token_file = Path(os.getcwd(), 'tests', 'token.txt')
|
||||||
|
if token_file.exists():
|
||||||
with open(token_file, 'r') as f:
|
with open(token_file, 'r') as f:
|
||||||
token = f.read()
|
token = f.read()
|
||||||
|
|
||||||
|
else:
|
||||||
|
token = os.environ.get('token')
|
||||||
|
|
||||||
return token
|
return token
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user