File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -55,9 +55,9 @@ def test_normalize_title(self):
55
55
'Fixes #101 — Everything you can imagine is real.' )
56
56
expected = 'Fixes #101 - Everything you can imagine is real.'
57
57
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 .'
61
61
self .assertEqual (actual , expected )
62
62
63
63
Original file line number Diff line number Diff line change @@ -76,10 +76,12 @@ def normalize_title(title):
76
76
See the test suite for the potential matches.
77
77
GitHub sends us a unicode string.
78
78
"""
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
+
83
85
else :
84
86
regex = r"[^ ]?\#(?P<number>\d+)[^\w]+(?P<prose>.*)"
85
87
m = re .search (regex , title )
You can’t perform that action at this time.
0 commit comments