Merge pull request #734 from jzelinskie/fixauthor

fix handling missing authors for Bitbucket
This commit is contained in:
Jimmy Zelinskie 2015-10-29 17:50:15 -04:00
commit 4724e2fd7c

View file

@ -200,8 +200,8 @@ def get_transformed_commit_info(bb_commit, ref, default_branch, repository_name,
match = _RAW_AUTHOR_REGEX.match(commit['raw_author'])
if match:
email_address = match.group(1)
author_info = JSONPathDict(lookup_author(email_address))
author = lookup_author(match.group(1))
author_info = JSONPathDict(author) if author is not None else None
if author_info:
config['commit_info.author.username'] = author_info['user.username']
config['commit_info.author.url'] = 'https://bitbucket.org/%s/' % author_info['user.username']