Skip to content

Commit

Permalink
REL: filter out @ in authors name
Browse files Browse the repository at this point in the history
  • Loading branch information
tupui committed Feb 17, 2022
1 parent 362524a commit b600dc6
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions tools/authors.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
#!/usr/bin/env python
# -*- encoding:utf-8 -*-
"""
git-authors [OPTIONS] REV1..REV2
List the authors who contributed within a given revision interval::
List the authors who contributed within a given revision interval.
python tools/authors.py REV1..REV2
`REVx` being a commit hash.
To change the name mapping, edit .mailmap on the top-level of the
repository.
Expand Down Expand Up @@ -122,10 +124,15 @@ def name_key(fullname):
""")

for author in authors:
# remove @ if only GH handle is available
author_clean = author.strip('@')
if author == 'GitHub':
continue

if author in all_authors:
stdout_b.write(("* %s\n" % author).encode('utf-8'))
stdout_b.write(("* %s\n" % author_clean).encode('utf-8'))
else:
stdout_b.write(("* %s +\n" % author).encode('utf-8'))
stdout_b.write(("* %s +\n" % author_clean).encode('utf-8'))

stdout_b.write(("""
A total of %(count)d people contributed to this release.
Expand Down

0 comments on commit b600dc6

Please sign in to comment.