From 6fdb93ba7494668c5ff393dedf78fb678f201669 Mon Sep 17 00:00:00 2001 From: Corey McCandless Date: Tue, 13 Nov 2018 10:19:53 -0500 Subject: [PATCH] bin/check-test-version: look for API token in .github.api_token --- bin/check-test-version.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/check-test-version.py b/bin/check-test-version.py index afd9ab3000..723bca0ba2 100755 --- a/bin/check-test-version.py +++ b/bin/check-test-version.py @@ -297,6 +297,10 @@ def check_test_version( opts = parser.parse_args() verify_spec_location(opts.spec_path) if opts.create_issue: + if opts.token is None: + if os.path.isfile('.github.api_token'): + with open('.github.api_token') as f: + opts.token = f.read().strip() if opts.token is not None: gh = GitHub(api_token=opts.token) else: