From 6e8b9ba12c96cbf422edd54a6cb12cbc0df66514 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 21 Mar 2013 10:57:23 -0500 Subject: Include Co-authored-by entries in AUTHORS. Co-authored-by lines are the way we've decided to indicated shared authorship of a patch, so content from them should be included in the generated AUTHORS file. Fixes bug 1158319. Change-Id: I9dacf78c01f3ad74e696f16a7aa39edb98e8d185 --- openstack/common/setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'openstack/common') diff --git a/openstack/common/setup.py b/openstack/common/setup.py index 030df61..dec74fd 100644 --- a/openstack/common/setup.py +++ b/openstack/common/setup.py @@ -171,6 +171,14 @@ def generate_authors(): " log --format='%aN <%aE>' | sort -u | " "egrep -v '" + jenkins_email + "'") changelog = _run_shell_command(git_log_cmd) + signed_cmd = ("git log --git-dir=" + git_dir + + " | grep -i Co-authored-by: | sort -u") + signed_entries = _run_shell_command(signed_cmd) + if signed_entries: + new_entries = "\n".join( + [signed.split(":", 1)[1].strip() + for signed in signed_entries.split("\n") if signed]) + changelog = "\n".join((changelog, new_entries)) mailmap = _parse_git_mailmap(git_dir) with open(new_authors, 'w') as new_authors_fh: new_authors_fh.write(canonicalize_emails(changelog, mailmap)) -- cgit