From 303522f388e1f1b26bd56718d7ca125460fb0bbc Mon Sep 17 00:00:00 2001 From: Alexander Saprykin Date: Wed, 27 Jun 2018 15:19:18 +0200 Subject: [PATCH] Update AUTHORS --- .mailmap | 8 +++++++- AUTHORS | 16 ++++++++++------ update-authors.py | 28 +++++----------------------- 3 files changed, 22 insertions(+), 30 deletions(-) diff --git a/.mailmap b/.mailmap index 49f760910..f38f162dc 100644 --- a/.mailmap +++ b/.mailmap @@ -1,3 +1,7 @@ +Alexander Saprykin Alexander Saprykin +Alexander Saprykin Alexander Saprykin +Alexander Saprykin Oleksandr Saprykin + Chris Houseknecht Chris Houseknecht chouseknecht Chris Houseknecht chouseknecht @@ -5,5 +9,7 @@ Chris Houseknecht vagrant chouseknecht Chris Houseknecht Chris Houseknecht Chris Houseknecht chouseknecht -Alexander Saprykin Oleksandr Saprykin + +David Newswanger David Newswanger + Khrystyna Bugaienko Kristina Bugaenko diff --git a/AUTHORS b/AUTHORS index 896bc8410..b1ad4ba9c 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,13 +1,17 @@ Galaxy has been contribued to by the following authors: This list is automatically generated - please file an issue for corrections) -Chris Houseknecht -James Cammarata +Adrian Likins Alexander Saprykin +Brian Coca Chris Church -Khrystyna Bugaienko -Joe Fiorini +Chris Houseknecht +Christopher Chase +David Newswanger +James Cammarata Jiri Tyr +Joe Fiorini +John Corrales Karl Goetz -Alexander Saprykin -Brian Coca +Khrystyna Bugaienko +cclauss diff --git a/update-authors.py b/update-authors.py index 265379b9c..62a6d1239 100755 --- a/update-authors.py +++ b/update-authors.py @@ -3,35 +3,17 @@ from __future__ import absolute_import, print_function, unicode_literals -import logging - -logger = logging.getLogger(__name__) - +import re import subprocess -from collections import defaultdict -user_scores = defaultdict(int) +author_re = re.compile(r'^\s*\d+\t([\w ]+ <[^>]+>)$') -git_log = subprocess.check_output("git log --shortstat --no-merges --pretty='%aN <%aE>'", - shell=True) +git_log = subprocess.check_output(['git', 'shortlog', '--summary', '--email']) log_entries = git_log.decode('utf-8').strip().split('\n') -while log_entries: - author = log_entries.pop(0) - _ = log_entries.pop(0) - commit_line = log_entries.pop(0) - commit_parts = [s.strip() for s in commit_line.split(', ')] - for clause in commit_parts: - count, action = clause.split(' ', 1) - if action.endswith('(+)'): - user_scores[author] += int(count) - elif action.endswith('(-)'): - user_scores[author] += int(count) - else: - user_scores[author] += int(count) +authors = [author_re.match(entry).group(1) for entry in log_entries] -sorted_user_scores = sorted(user_scores.items(), key=lambda tpl: tpl[1], reverse=True) print("Galaxy has been contribued to by the following authors:\n" "This list is automatically generated - please file an issue for corrections)\n") -for author, _ in sorted_user_scores: +for author in authors: print(author)