diff --git a/stackalytics/processor/vcs.py b/stackalytics/processor/vcs.py index b8b533f5e..d194026c0 100644 --- a/stackalytics/processor/vcs.py +++ b/stackalytics/processor/vcs.py @@ -65,7 +65,7 @@ GIT_LOG_PATTERN = re.compile(''.join([(r[0] + ':(.*?)\n') 'diff_stat:(?P.+?)(?=commit|\Z)', re.DOTALL) -CO_AUTHOR_PATTERN_RAW = ('(?P.+?)\s*' +CO_AUTHOR_PATTERN_RAW = ('(?P.*?)\s*' '[\w\.-]+@[\w\.-]+)>?') CO_AUTHOR_PATTERN = re.compile(CO_AUTHOR_PATTERN_RAW, re.IGNORECASE) diff --git a/stackalytics/tests/unit/test_vcs.py b/stackalytics/tests/unit/test_vcs.py index 5b636c8a7..200d4622e 100644 --- a/stackalytics/tests/unit/test_vcs.py +++ b/stackalytics/tests/unit/test_vcs.py @@ -135,6 +135,7 @@ Co-Authored-By: Tupac Shakur Also: Bob Dylan Co-Authored: Anonymous Co-Author-By: Anonymous2 +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'])