chromium: get-commit-message.py: Improve the parsing

The latest announcement uses the following structure: "Google is aware
the exploits for CVE-2021-37975 and CVE-2021-37976 exist in the wild."
(https://chromereleases.googleblog.com/2021/09/stable-channel-update-for-desktop_30.html)
This commit is contained in:
Michael Weiss 2021-10-02 11:58:08 +02:00
parent 6ea0d68c4d
commit d0ed7ee0b0
No known key found for this signature in database
GPG key ID: 5BE487C4D4771D83

View file

@ -39,7 +39,7 @@ for entry in feed.entries:
print('chromium: TODO -> ' + version + '\n')
print(url)
if fixes := re.search(r'This update includes .+ security fixes\.', content).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)? th(e|at) .+ in the wild\.', content)
if zero_days:
fixes += " " + zero_days.group(0)
print('\n' + '\n'.join(textwrap.wrap(fixes, width=72)))