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
This commit is contained in:
Michael Weiss 2021-06-10 12:00:34 +02:00
parent 6de7be454a
commit c02ac479ba
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)))