summaryrefslogtreecommitdiff
path: root/scripts/gh.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/gh.py')
-rw-r--r--scripts/gh.py4
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))