You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-08-13 22:12:50 +02:00
Doc: Better handling of platform in changelog autogenerate
This commit is contained in:
@@ -106,9 +106,17 @@ function formatCommitMessage(msg) {
|
|||||||
|
|
||||||
const splitted = msg.split(':');
|
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) {
|
if (splitted.length) {
|
||||||
const platform = splitted[0].trim().toLowerCase();
|
const platform = splitted[0].trim().toLowerCase();
|
||||||
if (['android', 'mobile', 'ios', 'desktop', 'cli', 'clipper', 'all'].indexOf(platform) >= 0) {
|
if (isPlatformPrefix(platform)) {
|
||||||
splitted.splice(0, 1);
|
splitted.splice(0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user