From fb2e1a691944287f9e1f69eebd0059ea31c3bee0 Mon Sep 17 00:00:00 2001 From: Azat Khuzhin Date: Sat, 20 May 2023 16:34:55 +0200 Subject: [PATCH] Use authors of the real patches instead of merge commits --- extra/release/changelog.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/extra/release/changelog.py b/extra/release/changelog.py index da4388e5..48413c3d 100755 --- a/extra/release/changelog.py +++ b/extra/release/changelog.py @@ -25,17 +25,22 @@ def main(): revision_range = repo.git.describe('--abbrev=0') + '..' for commit in repo.iter_commits(revision_range): + authors = set({commit.author}) if squash: if commit.hexsha in ignore: continue if len(commit.parents) > 1: + # reset authors, since we do not want to take any credits to + # the merger + authors.clear() for c in repo.iter_commits('{}..{}'.format(*commit.parents)): ignore.append(c.hexsha) + authors.add(c.author) print(opts.format % { 's': commit.summary, 'h': commit.hexsha[:opts.abbrev], # TODO: use GitHub API to extract github user names - 'aN': str(commit.author), + 'aN': ', '.join(map(str, authors)), })