def commit_info(commit): author = contributor_from_raw(commit.author) committer = contributor_from_raw(commit.committer) message_lines = commit.message.splitlines() summary = first(message_lines, '') description = '\n'.join(true_only(rest(message_lines))) return { 'author': author, 'committer': committer, 'sha': commit.sha().hexdigest(), 'time': commit.commit_time, 'timezone': commit.commit_timezone, 'message': commit.message, 'summary': summary, 'description': description, }
def commit_info(commit): author = contributor_from_raw(commit.author) committer = contributor_from_raw(commit.committer) message_lines = commit.message.splitlines() summary = first(message_lines, '') description = '\n'.join( true_only( rest( message_lines ) ) ) return { 'author': author, 'committer': committer, 'sha': commit.sha().hexdigest(), 'time': commit.commit_time, 'timezone': commit.commit_timezone, 'message': commit.message, 'summary': summary, 'description': description, }