Extend co-author pattern to handle case when no name given
Change-Id: Iee74c4cd6b5d06a966c2d88d158e43aabd3163de
This commit is contained in:
parent
5f81db5f87
commit
6bd14511a9
@ -65,7 +65,7 @@ GIT_LOG_PATTERN = re.compile(''.join([(r[0] + ':(.*?)\n')
|
||||
'diff_stat:(?P<diff_stat>.+?)(?=commit|\Z)',
|
||||
re.DOTALL)
|
||||
|
||||
CO_AUTHOR_PATTERN_RAW = ('(?P<author_name>.+?)\s*'
|
||||
CO_AUTHOR_PATTERN_RAW = ('(?P<author_name>.*?)\s*'
|
||||
'<?(?P<author_email>[\w\.-]+@[\w\.-]+)>?')
|
||||
CO_AUTHOR_PATTERN = re.compile(CO_AUTHOR_PATTERN_RAW, re.IGNORECASE)
|
||||
|
||||
|
@ -135,6 +135,7 @@ Co-Authored-By: Tupac Shakur <tupac.shakur@openstack.com>
|
||||
Also: Bob Dylan <bob.dylan@openstack.com>
|
||||
Co-Authored: Anonymous <correct@email.com>
|
||||
Co-Author-By: Anonymous2 <correct@email2.com>
|
||||
co-authored-by: brian.tully@hp.com
|
||||
Co-Author: Winnie the Pooh winnie222@openstack.org
|
||||
|
||||
diff_stat:
|
||||
@ -217,3 +218,8 @@ diff_stat:
|
||||
{'author_name': 'Winnie the Pooh',
|
||||
'author_email': 'winnie222@openstack.org'},
|
||||
commits[7]['coauthor'])
|
||||
|
||||
self.assertIn(
|
||||
{'author_name': '',
|
||||
'author_email': 'brian.tully@hp.com'},
|
||||
commits[7]['coauthor'])
|
||||
|
Loading…
x
Reference in New Issue
Block a user