Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def get_commit_authorship(self, commit):
data = commit['data']
# Sanitize ext:(....) blocks from GIT_AUTHOR_NAME. hg-git adds these
# for metadata.
userid = self.userid_ext_hggit_regex.sub(' ', data['Author'])
author = self.get_committer(userid=userid)
timestamp = grimoirelab.toolkit.datetime.str_to_datetime(data['CommitDate'])
return (author, timestamp)
def parse_date(timestamp):
return grimoirelab.toolkit.datetime.unixtime_to_datetime(timestamp)