From 8af2d819b0ec3cd320ed915219bce922c1b25472 Mon Sep 17 00:00:00 2001 From: Chaiwat Ekkaewnumchai Date: Thu, 17 Dec 2020 19:32:07 -0800 Subject: [PATCH] Remove Trailing Whitespace in Changelog Summary: In D25584424 (V1), Sandcastle complained about trailing whitespace. This diff removes the adde description if none can be retrieved Reviewed By: nikoant Differential Revision: D25608443 fbshipit-source-id: a798bb0c40afaaafd55c90c70177f7c2af79af34 --- desktop/scripts/generate-changelog.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/desktop/scripts/generate-changelog.js b/desktop/scripts/generate-changelog.js index 9fe2531c7..f5f14d22b 100755 --- a/desktop/scripts/generate-changelog.js +++ b/desktop/scripts/generate-changelog.js @@ -71,11 +71,13 @@ hgLog const matchFacebook = diffline.match(changeLogFacebookLineRe); if (matchFacebook) { changes++; - contentsFacebook += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits) - ${matchFacebook[2]}\n`; + const detail = matchFacebook[2] ? ` - ${matchFacebook[2]}` : ''; + contentsFacebook += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits)${detail}\n`; } else if (match) { changes++; - contents += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits) - ${match[2]}\n`; - contentsFacebook += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits) - ${match[2]}\n`; + const detail = match[2] ? ` - ${match[2]}` : ''; + contents += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits)${detail}\n`; + contentsFacebook += ` * [${diff}](https://github.com/facebook/flipper/search?q=${diff}&type=Commits)${detail}\n`; } }); });