all_authors = [] if tag: # print git info, in addition to GitHub info: since_tag = tag + '..' cmd = ['git', 'log', '--oneline', since_tag] ncommits += len(check_output(cmd).splitlines()) author_cmd = [ 'git', 'log', '--use-mailmap', "--format=* %aN", since_tag ] all_authors.extend( check_output(author_cmd).decode('utf-8', 'replace').splitlines()) pr_authors = [] for pr in pulls: pr_authors.extend(get_authors(pr)) ncommits = len(pr_authors) + ncommits - len(pulls) author_cmd = ['git', 'check-mailmap'] + pr_authors with_email = check_output(author_cmd).decode('utf-8', 'replace').splitlines() all_authors.extend(['* ' + a.split(' <')[0] for a in with_email]) unique_authors = sorted(set(all_authors), key=lambda s: s.lower()) print("We closed %d issues and merged %d pull requests." % (n_issues, n_pulls)) if milestone: print( "The full list can be seen `on GitHub <https://github.com/%s/milestone/%s>`__" % (project, milestone)) print()
print() ncommits = 0 all_authors = [] if tag: # print git info, in addition to GitHub info: since_tag = tag+'..' cmd = ['git', 'log', '--oneline', since_tag] ncommits += len(check_output(cmd).splitlines()) author_cmd = ['git', 'log', '--use-mailmap', "--format=* %aN", since_tag] all_authors.extend(check_output(author_cmd).decode('utf-8', 'replace').splitlines()) pr_authors = [] for pr in pulls: pr_authors.extend(get_authors(pr)) ncommits = len(pr_authors) + ncommits - len(pulls) author_cmd = ['git', 'check-mailmap'] + pr_authors with_email = check_output(author_cmd).decode('utf-8', 'replace').splitlines() all_authors.extend([ u'* ' + a.split(' <')[0] for a in with_email ]) unique_authors = sorted(set(all_authors), key=lambda s: s.lower()) print("We closed %d issues and merged %d pull requests." % (n_issues, n_pulls)) if milestone: print("The full list can be seen `on GitHub <https://github.com/{project}/issues?q=milestone%3A{milestone}+>`__".format(project=project,milestone=milestone) ) print() print("The following %i authors contributed %i commits." % (len(unique_authors), ncommits)) print() print('\n'.join(unique_authors))