Skip to content

Commit ad69300

Browse files
committed
Merge branch 'apsychogirl-3297/1'
2 parents 357e053 + a246dc6 commit ad69300

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

tests/unit/test_tools_changelog.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ def test_normalize_title(self):
5555
'Fixes #101 — Everything you can imagine is real.')
5656
expected = 'Fixes #101 - Everything you can imagine is real.'
5757
self.assertEqual(actual, expected)
58-
# GreenKeeper title style
59-
actual = changelog.normalize_title('Greenkeeper style 🚀')
60-
expected = 'NPM update - Greenkeeper style.'
58+
# Dependabot-review title style
59+
actual = changelog.normalize_title('Bump grunt from 1.0.4 to 1.1.0')
60+
expected = 'NPM update - Upgrade grunt from 1.0.4 to 1.1.0.'
6161
self.assertEqual(actual, expected)
6262

6363

tools/changelog.py

+6-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ def normalize_title(title):
7676
See the test suite for the potential matches.
7777
GitHub sends us a unicode string.
7878
"""
79-
if '🚀' in title:
80-
title = title.replace('🚀', '')
81-
title = title.strip()
82-
title = 'NPM update - {title}.'.format(title=title)
79+
80+
if title.startswith('Bump'):
81+
title = title.partition(' ')
82+
title = 'NPM update - Upgrade {title}.'.format(
83+
title=title[2])
84+
8385
else:
8486
regex = r"[^ ]?\#(?P<number>\d+)[^\w]+(?P<prose>.*)"
8587
m = re.search(regex, title)

0 commit comments

Comments
 (0)