Update CHANGELOG format to follow "Keep a Changelog"

This commit is contained in:
schroda
2025-10-14 02:45:55 +02:00
parent b5c730d3db
commit 8d276c25bd
4 changed files with 150 additions and 1838 deletions

View File

@@ -1,29 +0,0 @@
# vX.Y.Z (rXXX)
## New
- ...
## Enhancements
- ...
## Removals
- ...
## Behaviour changes
- ...
## Bug fixes
- ...
## Under the hood
- ...
## Translations
Feel free to translate the project on [Weblate](https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/)
Thank you for your contribution to the translation of the project.
- ...
## Full Changelog
- N/A (latest commit to oldest commit)

File diff suppressed because it is too large Load Diff

View File

@@ -64,8 +64,8 @@ export const WebUIUpdateChecker = () => {
const changelogUrl = const changelogUrl =
updateStatus.info?.channel === WebUiChannel.Stable updateStatus.info?.channel === WebUiChannel.Stable
? `https://github.com/Suwayomi/Suwayomi-WebUI/releases/latest` ? 'https://github.com/Suwayomi/Suwayomi-WebUI/releases/latest'
: `https://github.com/Suwayomi/Suwayomi-WebUI/issues/749`; : 'https://github.com/Suwayomi/Suwayomi-WebUI/blob/28a2b44e940cad6736fb53dd207cd420fcf627d3/CHANGELOG.md';
const newVersion = aboutWebUI?.tag; const newVersion = aboutWebUI?.tag;
const isSameAsCurrent = !newVersion || !webUIVersion || webUIVersion === newVersion; const isSameAsCurrent = !newVersion || !webUIVersion || webUIVersion === newVersion;

View File

@@ -168,14 +168,14 @@ const getLanguageLinesFromChangelog = (): Promise<string[]> => {
const translationRelevantLines: string[] = []; const translationRelevantLines: string[] = [];
let isTranslationSection = false; let isTranslationSection = false;
fileLineReader.on('line', (line) => { fileLineReader.on('line', (line) => {
if (line.toLowerCase() === '## Translations'.toLowerCase()) { if (line.toLowerCase() === '### Translations'.toLowerCase()) {
isTranslationSection = true; isTranslationSection = true;
return; return;
} }
const isStartOfRemovedLanguages = line.toLowerCase().startsWith('### Removed'.toLowerCase()); const isStartOfRemovedLanguages = line.toLowerCase().startsWith('#### Removed'.toLowerCase());
const isStartOfFullChangelog = line.toLowerCase() === '## Full Changelog'.toLowerCase(); const isContributorsSection = line.toLowerCase().startsWith('### Contributors'.toLowerCase());
const isEndOfLanguageSection = isStartOfRemovedLanguages || isStartOfFullChangelog; const isEndOfLanguageSection = isStartOfRemovedLanguages || isContributorsSection;
if (isEndOfLanguageSection) { if (isEndOfLanguageSection) {
isTranslationSection = false; isTranslationSection = false;
@@ -263,13 +263,13 @@ export const createTranslationChangelog = async (
const updatedLanguages = languageByNewState.false ?? []; const updatedLanguages = languageByNewState.false ?? [];
let changelog = let changelog =
'## Translations\n' + '### Translations\n' +
'Feel free to translate the project on [Weblate](https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/)\n' + 'Feel free to translate the project on [Weblate](https://hosted.weblate.org/projects/suwayomi/suwayomi-webui/)\n' +
'\n' + '\n' +
'Thank you for your contribution to the translation of the project.\n\n'; 'Thanks to everyone that contributed to the translation of this project.\n\n';
if (newLanguages.length) { if (newLanguages.length) {
changelog += '### Added\n'; changelog += '#### Added\n';
newLanguages.forEach(({ language, contributors }) => { newLanguages.forEach(({ language, contributors }) => {
changelog += `- ${language} (by ${contributors.join(', ')})\n`; changelog += `- ${language} (by ${contributors.join(', ')})\n`;
}); });
@@ -277,7 +277,7 @@ export const createTranslationChangelog = async (
} }
if (updatedLanguages.length) { if (updatedLanguages.length) {
changelog += '### Updated\n'; changelog += '#### Updated\n';
updatedLanguages.forEach(({ language, contributors }) => { updatedLanguages.forEach(({ language, contributors }) => {
changelog += `- ${language} (by ${contributors.join(', ')})\n`; changelog += `- ${language} (by ${contributors.join(', ')})\n`;
}); });