bin/gen_release_notes.py: do not fail on confidential features

A commit may refer to an issue marked as confidential. That will look
like a 404 page for outside users. One example of such commit is:

    369c12e5be "anv: clear descriptorsets if AllocateDescriptorSets fails"

Let's handle that case.

Cc: mesa-stable
Signed-off-by: Konstantin Kharlamov <Hi-Angel@yandex.ru>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20241>
This commit is contained in:
Konstantin Kharlamov
2022-12-08 22:53:51 +03:00
parent bd807eecd1
commit 334123a908

View File

@@ -227,7 +227,12 @@ async def get_bug(session: aiohttp.ClientSession, bug_id: str) -> str:
params = {'iids[]': bug_id}
async with session.get(url, params=params) as response:
content = await response.json()
return content[0]['title']
if not content:
# issues marked as "confidential" look like "404" page for
# unauthorized users
return f'Confidential issue #{bug_id}'
else:
return content[0]['title']
async def get_shortlog(version: str) -> str: