chromium: get-commit-message.py: Support a new 0-day sentence

The current stable release announcement [0] uses a slightly different
message/structure.

[0]: https://chromereleases.googleblog.com/2021/06/stable-channel-update-for-desktop.html

(cherry picked from commit c02ac479ba55d802d6232cdb743f5228984e2ff9)
This commit is contained in:
Michael Weiss 2021-06-10 12:00:34 +02:00
parent ede696c79d
commit 06924553df
No known key found for this signature in database
GPG Key ID: 5BE487C4D4771D83

View File

@ -27,7 +27,7 @@ for entry in feed.entries:
print('\n' + url)
if fixes := re.search(r'This update includes .+ security fixes\.', content):
fixes = html_tags.sub('', fixes.group(0))
zero_days = re.search(r'Google is aware of reports that .+ in the wild\.', content)
zero_days = re.search(r'Google is aware( of reports)? that .+ in the wild\.', content)
if zero_days:
fixes += " " + zero_days.group(0)
print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))