1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-01-26 18:58:21 +02:00

Doc: Better handling of platform in changelog autogenerate

This commit is contained in:
Laurent Cozic 2019-05-03 15:02:32 +00:00
parent 4f47bd7bcd
commit 782aae4ddf

View File

@ -106,9 +106,17 @@ function formatCommitMessage(msg) {
const splitted = msg.split(':');
const isPlatformPrefix = prefix => {
prefix = prefix.split(',').map(p => p.trim().toLowerCase());
for (const p of prefix) {
if (['android', 'mobile', 'ios', 'desktop', 'cli', 'clipper', 'all'].indexOf(p) >= 0) return true;
}
return false;
}
if (splitted.length) {
const platform = splitted[0].trim().toLowerCase();
if (['android', 'mobile', 'ios', 'desktop', 'cli', 'clipper', 'all'].indexOf(platform) >= 0) {
if (isPlatformPrefix(platform)) {
splitted.splice(0, 1);
}