From e433bd286d1e9e3f473fd284e7fa54d02a836a31 Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 7 Dec 2023 08:14:45 +0100 Subject: [PATCH 1/3] Alphabetically sort contributors --- src/utils/change.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/change.ts b/src/utils/change.ts index 46a61a8..c6f6d86 100644 --- a/src/utils/change.ts +++ b/src/utils/change.ts @@ -115,16 +115,16 @@ export function getChangeLogSection( nextVersion ); - const contributors = `### ❤️ Thanks to all contributors! ❤️\n\n${changes - .map((change) => `@${change.author}`) - .filter((v, i, a) => a.indexOf(v) === i) - .join(", ")}`; - const releaseDate = new Date().toISOString().split("T")[0]; let section = `## [${nextVersion}](${releaseLink}) - ${releaseDate}\n\n`; if (includeContributors) { + const contributors = `### ❤️ Thanks to all contributors! ❤️\n\n${changes + .map((change) => `@${change.author}`) + .sort() + .filter((v, i, a) => a.indexOf(v) === i) + .join(", ")}`; section += `${contributors}\n\n`; } From be44769f15b7c7d4ff2cbbfe955e9b7c5d07de5f Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 7 Dec 2023 08:24:13 +0100 Subject: [PATCH 2/3] fix fixtures --- src/utils/__snapshots__/change.test.ts.snap | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/utils/__snapshots__/change.test.ts.snap b/src/utils/__snapshots__/change.test.ts.snap index d29964a..cd6f615 100644 --- a/src/utils/__snapshots__/change.test.ts.snap +++ b/src/utils/__snapshots__/change.test.ts.snap @@ -7,7 +7,7 @@ exports[`change > 'should add new section' 1`] = ` ### ❤️ Thanks to all contributors! ❤️ -@John Doe, @Alice Wonderland +@Alice Wonderland, @John Doe ### 💥 Breaking changes @@ -58,7 +58,7 @@ exports[`change > 'should remove previous prerelease versions as soon as the ful ### ❤️ Thanks to all contributors! ❤️ -@John Doe, @Alice Wonderland +@Alice Wonderland, @John Doe ### 💥 Breaking changes @@ -108,7 +108,7 @@ exports[`change > 'should remove versions newer than the latest released version ### ❤️ Thanks to all contributors! ❤️ -@John Doe, @Alice Wonderland +@Alice Wonderland, @John Doe ### 💥 Breaking changes @@ -155,7 +155,7 @@ exports[`change > 'should update existing changelog section' 1`] = ` ### ❤️ Thanks to all contributors! ❤️ -@John Doe, @Alice Wonderland +@Alice Wonderland, @John Doe ### 💥 Breaking changes @@ -264,7 +264,7 @@ exports[`change > should generate a changelog 1`] = ` ### ❤️ Thanks to all contributors! ❤️ -@John Doe, @Alice Wonderland +@Alice Wonderland, @John Doe ### 💥 Breaking changes From cd540c776ff2abf7b46b0e2cf21db2336cf623ea Mon Sep 17 00:00:00 2001 From: qwerty287 <80460567+qwerty287@users.noreply.github.com> Date: Thu, 7 Dec 2023 08:52:53 +0100 Subject: [PATCH 3/3] Update src/utils/change.ts Co-authored-by: Anbraten --- src/utils/change.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/change.ts b/src/utils/change.ts index c6f6d86..3a4b95c 100644 --- a/src/utils/change.ts +++ b/src/utils/change.ts @@ -124,6 +124,7 @@ export function getChangeLogSection( .map((change) => `@${change.author}`) .sort() .filter((v, i, a) => a.indexOf(v) === i) + .filter((c) => !c.endsWith('[bot]')) .join(", ")}`; section += `${contributors}\n\n`; }