I am trying to get the email addresses of the committers of a project to specific files. After creating a query that finds the code files in a list of repos matching specific criteria, I get the correct results in the form of code_results (of type CodeSearchResult). Now to try access the commit information, I do the following
for code_result in code_results:
repository = code_result.repository
file_path = code_result.path
commits = repository.commits(path=file_path)
for commit in commits:
if commit.committer is not None:
print commit.committer
The problem is that trying to get the email through commit.committer.email always returns None even though the documentation says that a commit contains the committer's email. I also tried author instead of committer since the documentation says the author is a dict containing the email, but I'm not sure what the dict keys are.
Thanks!