diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2019-01-14 13:19:52 +0100 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2019-01-14 13:19:52 +0100 |
commit | d4b6e9839823e27af646a915436462254758e053 (patch) | |
tree | 00a79ba026f7e90a0347944b5ee8dc58402e6dc4 /scripts/gh.py | |
parent | 4b062a6a99a31b34e5a1556680f27369d690dc7b (diff) |
pushed auth into query string for gh-getv2.1.2
Diffstat (limited to 'scripts/gh.py')
-rw-r--r-- | scripts/gh.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/gh.py b/scripts/gh.py index d12b416..81db1b2 100644 --- a/scripts/gh.py +++ b/scripts/gh.py @@ -13,11 +13,11 @@ if tok == '': def pr(j): print(json.dumps(j, indent=2)) # call GitHub API with curl -def gh(s, args=[], quiet=True, parse=True): +def gh(s, args=[], quiet=True, parse=True, auth=True): cmd = (["curl"] + (["-s"] if quiet else []) + args + - ["-H", "Authorization: token " + tok] + + (["-H", "Authorization: token " + tok] if auth else []) + [s if 'https://' in s else api_url + '/' + s]) # ONLY UN-COMMENT FOR TESTING: # print(' '.join(cmd)) |