diff options
author | Dylan Baker <dylan.c.baker@intel.com> | 2020-12-16 13:40:05 -0800 |
---|---|---|
committer | Dylan Baker <dylan.c.baker@intel.com> | 2020-12-16 13:41:05 -0800 |
commit | 8c0cc44b283a52a12912f0aba06adcaf269834ff (patch) | |
tree | 73e7df71512ee18024d95a2a4327b94e90b4e994 /bin | |
parent | 87bfed33e90831d1aa6fd9fa0e66fb7acf5a8da6 (diff) |
docs: add release notes for 20.2.6
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/gen_release_notes.py | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/bin/gen_release_notes.py b/bin/gen_release_notes.py index 716f807b317..f7a5c14cd34 100755 --- a/bin/gen_release_notes.py +++ b/bin/gen_release_notes.py @@ -113,24 +113,25 @@ async def gather_bugs(version: str) -> typing.List[str]: commits = await gather_commits(version) issues: typing.List[str] = [] - for commit in commits.split('\n'): - sha, message = commit.split(maxsplit=1) - p = await asyncio.create_subprocess_exec( - 'git', 'log', '--max-count', '1', r'--format=%b', sha, - stdout=asyncio.subprocess.PIPE) - _out, _ = await p.communicate() - out = _out.decode().split('\n') - for line in reversed(out): - if line.startswith('Closes:'): - bug = line.lstrip('Closes:').strip() - break - else: - raise Exception('No closes found?') - if bug.startswith('h'): - # This means we have a bug in the form "Closes: https://..." - issues.append(os.path.basename(urllib.parse.urlparse(bug).path)) - else: - issues.append(bug.lstrip('#')) + if commits: + for commit in commits.split('\n'): + sha, message = commit.split(maxsplit=1) + p = await asyncio.create_subprocess_exec( + 'git', 'log', '--max-count', '1', r'--format=%b', sha, + stdout=asyncio.subprocess.PIPE) + _out, _ = await p.communicate() + out = _out.decode().split('\n') + for line in reversed(out): + if line.startswith('Closes:'): + bug = line.lstrip('Closes:').strip() + break + else: + raise Exception('No closes found?') + if bug.startswith('h'): + # This means we have a bug in the form "Closes: https://..." + issues.append(os.path.basename(urllib.parse.urlparse(bug).path)) + else: + issues.append(bug.lstrip('#')) loop = asyncio.get_event_loop() async with aiohttp.ClientSession(loop=loop) as session: |