| Index: infra/tools/antibody/git_commit_parser.py
|
| diff --git a/infra/tools/antibody/git_commit_parser.py b/infra/tools/antibody/git_commit_parser.py
|
| index d126654b672d77f3c14b1e6d9759d38bf1c2266a..7a0070d90185fbbea62d4b8eb67d558e1adcd09e 100644
|
| --- a/infra/tools/antibody/git_commit_parser.py
|
| +++ b/infra/tools/antibody/git_commit_parser.py
|
| @@ -21,6 +21,7 @@ def read_commit_info(git_checkout_path, commits_after_date,
|
| Args:
|
| git_checkout_path(str): path to a local git checkout
|
| git_log_format(str): formatting directives passed to git log --format
|
| +
|
| Return:
|
| log(str): output of git log
|
| """
|
| @@ -65,12 +66,18 @@ def get_bug_url(git_line):
|
|
|
| def get_tbr(git_line):
|
| tbr = None
|
| - if git_line.startswith('TBR=') and len(git_line) > 4:
|
| - tbr = git_line[4:]
|
| - tbr = [x.strip() for x in tbr.split(',')]
|
| + if git_line.startswith('TBR='):
|
| + if len(git_line) > 4:
|
| + tbr = git_line[4:]
|
| + tbr = [x.strip().split('@')[0] for x in tbr.split(',')]
|
| + else:
|
| + tbr = ['NOBODY']
|
| return tbr
|
|
|
|
|
| +# TODO(keelerh): figure out how to parse existence of a review url if
|
| +# not prefaced by any indicator (because review urls for other commits
|
| +# appear in the commit message frequently for reverts and references)
|
| def get_review_url(git_line):
|
| review_url = None
|
| if re.match(r'^Review:.+$', git_line):
|
| @@ -112,7 +119,7 @@ def get_features_for_commit_people(git_commit):
|
| (tuple): relevant people and type extracted from the commit
|
| """
|
| git_hash = git_commit['id']
|
| - author = git_commit['author']
|
| + author = git_commit['author'].split('@')[0]
|
| people_rows = [(author, git_hash, curr_time, 'author')]
|
| TBR = None
|
| for line in git_commit['body'].split('\n'):
|
|
|