Update changelog to match globalchangelog
This commit is contained in:
parent
7e8f7f5f4b
commit
e73ceee074
|
@ -25,14 +25,13 @@ module.exports = {
|
||||||
for (const entry of changelogEntries) {
|
for (const entry of changelogEntries) {
|
||||||
const game = await checkGameStorageId(entry.gameId);
|
const game = await checkGameStorageId(entry.gameId);
|
||||||
|
|
||||||
if (entry.oldStatus && entry.newStatus) {
|
if (entry.newStatus == 'planning') {
|
||||||
// Status changed
|
desc = desc.concat(`:pencil: planned **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
||||||
desc = desc.concat(`:arrow_right: moved **${game.name}** from **${entry.oldStatus}** to **${entry.newStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
} else if (entry.newStatus == 'playing') {
|
||||||
} else if (!entry.oldStatus && entry.newStatus) {
|
desc = desc.concat(`:video_game: started playing **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
||||||
// Created entry
|
} else if (entry.newStatus == 'beat') {
|
||||||
desc = desc.concat(`:white_check_mark: added **${game.name}** to **${entry.newStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
desc = desc.concat(`:white_check_mark: beat **${game.name}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
||||||
} else if (entry.oldStatus && !entry.newStatus) {
|
} else if (!entry.newStatus) {
|
||||||
// Deleted Entry
|
|
||||||
desc = desc.concat(`:x: deleted **${game.name}** from **${entry.oldStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
desc = desc.concat(`:x: deleted **${game.name}** from **${entry.oldStatus}** *(${entry.createdAt.toLocaleDateString('en-GB', { year: 'numeric', month: '2-digit', day: '2-digit' }).replace(/\//g, '/')})*\n`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue