From 856b531e4711dc3ff9f3db75f1740097f108ac94 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Fri, 7 Aug 2020 09:34:50 +0200 Subject: [PATCH] Remove common PR title prefixes --- release.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/release.js b/release.js index 0cf25473a4b9..8d6d469d083f 100644 --- a/release.js +++ b/release.js @@ -88,6 +88,14 @@ const groupByLabels = async (commits, github) => { return sections } +function cleanupPRTitle(title) { + if (title.startsWith('[Docs] ')) { + return title.replace('[Docs] ', '') + } + + return title +} + const buildChangelog = (sections, authors) => { let text = '' @@ -105,7 +113,7 @@ const buildChangelog = (sections, authors) => { for (const change of changes) { const numberText = change.number != null ? `: #${change.number}` : '' - text += `- ${change.title}${numberText}\n` + text += `- ${cleanupPRTitle(change.title)}${numberText}\n` } text += '\n'