From dc02c2a9fe6d7272014ce3a1646f05a22a34c401 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 9 Jun 2022 12:38:44 -0400 Subject: [PATCH] Fix scripts/create-release-pr PR body generation Signed-off-by: Sebastian Malton --- .../{clear-release-pr.mjs => create-release-pr.mjs} | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) rename scripts/{clear-release-pr.mjs => create-release-pr.mjs} (94%) diff --git a/scripts/clear-release-pr.mjs b/scripts/create-release-pr.mjs similarity index 94% rename from scripts/clear-release-pr.mjs rename to scripts/create-release-pr.mjs index 4b55384e61..1689f5d6f5 100755 --- a/scripts/clear-release-pr.mjs +++ b/scripts/create-release-pr.mjs @@ -152,11 +152,15 @@ const prBodyLines = [ "", ]; +function getPrEntry(pr) { + return `- ${pr.title} (**[#${pr.number}](https://github.com/lensapp/lens/pull/${pr.number})**) https://github.com/${pr.author.login}`; +} + if (enhancementPrs.length > 0) { prBodyLines.push( "## 🚀 Features", "", - ...enhancementPrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`), + ...enhancementPrs.map(getPrEntry), "", ); } @@ -165,7 +169,7 @@ if (bugfixPrs.length > 0) { prBodyLines.push( "## 🐛 Bug Fixes", "", - ...bugfixPrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`), + ...bugfixPrs.map(getPrEntry), "", ); } @@ -174,7 +178,7 @@ if (maintenencePrs.length > 0) { prBodyLines.push( "## 🧰 Maintenance", "", - ...maintenencePrs.map(pr => `- ${pr.title} (**#${pr.number}**) https://github.com/${pr.author.login}`), + ...maintenencePrs.map(getPrEntry), "", ); }