From c2bef6cdf0c3c05e35e2e3e08b257656445306fa Mon Sep 17 00:00:00 2001 From: neverland Date: Sun, 6 Aug 2023 21:33:41 +0800 Subject: [PATCH] chore: add script to format GitHub changelog (#12158) --- packages/vant/docs/formatChangelog.mjs | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 packages/vant/docs/formatChangelog.mjs diff --git a/packages/vant/docs/formatChangelog.mjs b/packages/vant/docs/formatChangelog.mjs new file mode 100644 index 000000000..5ef24fa46 --- /dev/null +++ b/packages/vant/docs/formatChangelog.mjs @@ -0,0 +1,60 @@ +/** + * This script is used to format changelog which is generated by GitHub + * because we need to paste it to the changelog page of Vant website. + */ + +// paste changelog here +const changelog = ``; + +changelog.split('\n').map((line) => { + // Skip unused lines + if ( + line.startsWith('> Please refer to') || + line.startsWith('release:') || + line.includes("What's Changed") || + line.includes('Full Changelog') || + line.includes('docs(changelog)') + ) { + return; + } + + if (line.startsWith('