Fix release notes script to handle empty PR descriptions. (#1196)

This commit is contained in:
Eryu Xia 2022-02-08 11:21:45 -08:00 committed by GitHub
parent 81ce4c52ff
commit 173cb546b7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -158,7 +158,8 @@ class ProcessChangelog:
if pr['merged_at'] is None: # not merged
continue
label_level = self._get_pr_label_level(pr['labels'])
m = re.search(r'author: ?@([A-Za-z\d-]+)', pr['body'])
m = None if pr['body'] is None else re.search(
r'author: ?@([A-Za-z\d-]+)', pr['body'])
if m:
author = m[1] # author attribution override
else: