From e687c3f298c0ed7c5285d11180e90042016da28a Mon Sep 17 00:00:00 2001 From: Koichi ITO Date: Thu, 21 Sep 2023 01:14:30 +0900 Subject: [PATCH] Fix duplicate contributor names when generating changelog Follow up https://github.com/rubocop/rubocop/commit/2d4b944 --- tasks/changelog.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tasks/changelog.rb b/tasks/changelog.rb index 3581b17b51..49b490ad3d 100644 --- a/tasks/changelog.rb +++ b/tasks/changelog.rb @@ -129,9 +129,9 @@ def merge_content end def new_contributor_lines - contributors - .map { |user| format(CONTRIBUTOR, user: user) } - .reject { |line| @rest.include?(line) } + unique_contributor_names = contributors.map { |user| format(CONTRIBUTOR, user: user) }.uniq + + unique_contributor_names.reject { |line| @rest.include?(line) } end def contributors