mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
devtools: if there's a message in the API call, print and exit
If you've got bad credentials, you'll get an error message.
This commit is contained in:
@@ -66,6 +66,10 @@ def get_log_entries(commitrange):
|
||||
url = 'https://api.github.com/repos/{repo}/commits/{commit}/pulls'.format(repo=repo, commit=commit)
|
||||
content = requests.get(url, headers=headers).json()
|
||||
if len(content):
|
||||
# Check for bad credentials
|
||||
if 'message' in content:
|
||||
print(content)
|
||||
exit()
|
||||
pullreq = content[0]['number']
|
||||
else:
|
||||
pullreq = None
|
||||
|
||||
Reference in New Issue
Block a user