Browse Source

devtools: remove pullreq logic from changelog script

seems super slow and buggy

Signed-off-by: William Casarin <jb55@jb55.com>
profile-edit
William Casarin 2 years ago
parent
commit
b72cdc2a2c
  1. 11
      devtools/changelog.py

11
devtools/changelog.py

@ -65,11 +65,12 @@ def get_log_entries(commitrange):
if os.environ.get('GH_TOKEN'): if os.environ.get('GH_TOKEN'):
headers['Authorization'] = 'token ' + os.environ.get('GH_TOKEN') headers['Authorization'] = 'token ' + os.environ.get('GH_TOKEN')
url = 'https://api.github.com/repos/{repo}/commits/{commit}/pulls'.format(repo=repo, commit=commit) #url = 'https://api.github.com/repos/{repo}/commits/{commit}/pulls'.format(repo=repo, commit=commit)
content = requests.get(url, headers=headers).json() #content = requests.get(url, headers=headers).json()
if content and content.get(0) is not None: #if content and content.get(0) is not None:
pullreq = content[0]['number'] # pullreq = content[0]['number']
else: #else:
# pullreq = None
pullreq = None pullreq = None
e = Entry(commit, pullreq, m.group(2), m.group(1).lower()) e = Entry(commit, pullreq, m.group(2), m.group(1).lower())

Loading…
Cancel
Save