Added 'Co-Author' to co-author's regex
Co-Author: Sergey Nikitin <snikitin@mirantis.com> Change-Id: I256e3a84dd022f7692305b482d7000dfbf47a0c7
This commit is contained in:
parent
a11ec895f0
commit
1238ae6bd2
@ -74,7 +74,7 @@ MESSAGE_PATTERNS = {
|
|||||||
'blueprint_id': re.compile(r'\b(?:blueprint|bp)\b[ \t]*[#:]?[ \t]*'
|
'blueprint_id': re.compile(r'\b(?:blueprint|bp)\b[ \t]*[#:]?[ \t]*'
|
||||||
r'(?P<id>[a-z0-9-]+)', re.IGNORECASE),
|
r'(?P<id>[a-z0-9-]+)', re.IGNORECASE),
|
||||||
'change_id': re.compile('Change-Id: (?P<id>I[0-9a-f]{40})', re.IGNORECASE),
|
'change_id': re.compile('Change-Id: (?P<id>I[0-9a-f]{40})', re.IGNORECASE),
|
||||||
'coauthor': re.compile(r'(?:Co-Authored|Also)-By:'
|
'coauthor': re.compile(r'(?:Co-Authored-By|Also-By|Co-Author):'
|
||||||
r'\s*(?P<id>%s)\s' % CO_AUTHOR_PATTERN_RAW,
|
r'\s*(?P<id>%s)\s' % CO_AUTHOR_PATTERN_RAW,
|
||||||
re.IGNORECASE)
|
re.IGNORECASE)
|
||||||
}
|
}
|
||||||
|
@ -122,13 +122,28 @@ Also-By: Bob Dylan <bob.dylan@openstack.com>
|
|||||||
Also-By: Anonymous <wrong@email>
|
Also-By: Anonymous <wrong@email>
|
||||||
Also-By: Winnie the Pooh winnie222@openstack.org
|
Also-By: Winnie the Pooh winnie222@openstack.org
|
||||||
|
|
||||||
|
diff_stat:
|
||||||
|
|
||||||
|
0 files changed, 0 insertions(+), 0 deletions(-)
|
||||||
|
commit_id:d1af9cbe0187e1a65cf1eb46fb1650cf619a7b3a
|
||||||
|
date:1369831300
|
||||||
|
author_name:Vasya Pupkin
|
||||||
|
author_email:vpupkinx@openstack.com
|
||||||
|
subject:adds new support of co-authors
|
||||||
|
message:Change-Id: I577dfdf7f65a0c883ddbcfda62daf8c5f9c746c1
|
||||||
|
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-Author: Winnie the Pooh winnie222@openstack.org
|
||||||
|
|
||||||
diff_stat:
|
diff_stat:
|
||||||
|
|
||||||
0 files changed, 0 insertions(+), 0 deletions(-)
|
0 files changed, 0 insertions(+), 0 deletions(-)
|
||||||
'''
|
'''
|
||||||
commits = list(self.git.log('dummy', 'dummy'))
|
commits = list(self.git.log('dummy', 'dummy'))
|
||||||
|
|
||||||
commits_expected = 7
|
commits_expected = 8
|
||||||
self.assertEqual(commits_expected, len(commits))
|
self.assertEqual(commits_expected, len(commits))
|
||||||
|
|
||||||
self.assertEqual(21, commits[0]['files_changed'])
|
self.assertEqual(21, commits[0]['files_changed'])
|
||||||
@ -177,3 +192,28 @@ diff_stat:
|
|||||||
{'author_name': 'Winnie the Pooh',
|
{'author_name': 'Winnie the Pooh',
|
||||||
'author_email': 'winnie222@openstack.org'},
|
'author_email': 'winnie222@openstack.org'},
|
||||||
commits[6]['coauthor'])
|
commits[6]['coauthor'])
|
||||||
|
|
||||||
|
self.assertIn(
|
||||||
|
{'author_name': 'Tupac Shakur',
|
||||||
|
'author_email': 'tupac.shakur@openstack.com'},
|
||||||
|
commits[7]['coauthor'])
|
||||||
|
|
||||||
|
self.assertNotIn(
|
||||||
|
{'author_name': 'Bob Dylan',
|
||||||
|
'author_email': 'bob.dylan@openstack.com'},
|
||||||
|
commits[7]['coauthor'])
|
||||||
|
|
||||||
|
self.assertNotIn(
|
||||||
|
{'author_name': 'Anonymous',
|
||||||
|
'author_email': 'correct@email.com'},
|
||||||
|
commits[7]['coauthor'])
|
||||||
|
|
||||||
|
self.assertNotIn(
|
||||||
|
{'author_name': 'Anonymous2',
|
||||||
|
'author_email': 'correct@email2.com'},
|
||||||
|
commits[7]['coauthor'])
|
||||||
|
|
||||||
|
self.assertIn(
|
||||||
|
{'author_name': 'Winnie the Pooh',
|
||||||
|
'author_email': 'winnie222@openstack.org'},
|
||||||
|
commits[7]['coauthor'])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user