Skip to content

Commit

Permalink
MINOR: Add co-authors to release email template (apache#14080)
Browse files Browse the repository at this point in the history
Reviewers: Mickael Maison <mickael.maison@gmail.com>
  • Loading branch information
divijvaidya committed Jul 26, 2023
1 parent 46a8a28 commit 206a4af
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions release.py
Expand Up @@ -332,8 +332,8 @@ def command_release_announcement_email():
validate_release_num(previous_release_version_num)
if release_version_num < previous_release_version_num :
fail("Current release version number can't be less than previous release version number")
number_of_contributors = int(subprocess.check_output('git shortlog -sn --no-merges %s..%s | wc -l' % (previous_release_version_num, release_version_num) , shell=True).decode('utf-8'))
contributors = subprocess.check_output("git shortlog -sn --no-merges %s..%s | cut -f2 | sort --ignore-case" % (previous_release_version_num, release_version_num), shell=True).decode('utf-8')
number_of_contributors = int(subprocess.check_output('git shortlog -sn --group=author --group=trailer:co-authored-by --no-merges %s..%s | uniq | wc -l' % (previous_release_version_num, release_version_num) , shell=True).decode('utf-8'))
contributors = subprocess.check_output("git shortlog -sn --group=author --group=trailer:co-authored-by --no-merges %s..%s | cut -f2 | sort --ignore-case | uniq" % (previous_release_version_num, release_version_num), shell=True).decode('utf-8')
release_announcement_data = {
'number_of_contributors': number_of_contributors,
'contributors': ', '.join(str(x) for x in filter(None, contributors.split('\n'))),
Expand Down Expand Up @@ -391,7 +391,7 @@ def command_release_announcement_email():
Capital One, Goldman Sachs, ING, LinkedIn, Netflix, Pinterest, Rabobank,
Target, The New York Times, Uber, Yelp, and Zalando, among others.
A big thank you for the following %(number_of_contributors)d contributors to this release!
A big thank you for the following %(number_of_contributors)d contributors to this release! (Please report an unintended omission)
%(contributors)s
Expand All @@ -404,7 +404,8 @@ def command_release_announcement_email():
Regards,
<YOU>""" % release_announcement_data
<YOU>
Release Manager for Apache Kafka %(release_version)s""" % release_announcement_data

print()
print("*****************************************************************")
Expand Down

0 comments on commit 206a4af

Please sign in to comment.