mirror of
https://github.com/Second-Hand-Friends/kleinanzeigen-bot.git
synced 2026-03-12 02:31:45 +01:00
fix: compare updates via release tag (#745)
## ℹ️ Description - Link to the related issue(s): Issue #N/A - Describe the motivation and context for this change. Ensure update-check compares against release tags instead of moving branch tips and keep tests/translations in sync. ## 📋 Changes Summary - compare release commit via tag name first and fall back only when missing - update update-checker tests for commit-ish resolution and tag-based release data - refresh German translations for update-checker log strings ### ⚙️ Type of Change Select the type(s) of change(s) included in this pull request: - [x] 🐞 Bug fix (non-breaking change which fixes an issue) ## ✅ Checklist Before requesting a review, confirm the following: - [x] I have reviewed my changes to ensure they meet the project's standards. - [x] I have tested my changes and ensured that all tests pass (`pdm run test`). - [x] I have formatted the code (`pdm run format`). - [x] I have verified that linting passes (`pdm run lint`). - [x] I have updated documentation where necessary. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Bug Fixes** * More reliable update checks by resolving commits from tags, branches or hashes and robustly comparing short vs full hashes. * Improved prerelease handling to avoid inappropriate preview updates and better handling of missing release data. * **Localization & UX** * Error and prerelease messages now use localized strings; commit dates shown consistently in UTC and short-hash form. * **Tests** * Updated tests to cover the new resolution flow, error cases, and logging behavior. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -520,10 +520,8 @@ kleinanzeigen_bot/utils/web_scraping_mixin.py:
|
||||
#################################################
|
||||
kleinanzeigen_bot/update_checker.py:
|
||||
#################################################
|
||||
_get_commit_date:
|
||||
"Could not get commit date: %s": "Konnte Commit-Datum nicht ermitteln: %s"
|
||||
_get_release_commit:
|
||||
"Could not get release commit: %s": "Konnte Release-Commit nicht ermitteln: %s"
|
||||
_resolve_commitish:
|
||||
"Could not resolve commit '%s': %s": "Konnte Commit '%s' nicht aufloesen: %s"
|
||||
check_for_updates:
|
||||
"A new version is available: %s from %s UTC (current: %s from %s UTC, channel: %s)": "Eine neue Version ist verfügbar: %s vom %s UTC (aktuell: %s vom %s UTC, Kanal: %s)"
|
||||
"Could not determine commit dates for comparison.": "Konnte Commit-Daten für den Vergleich nicht ermitteln."
|
||||
@@ -531,8 +529,6 @@ kleinanzeigen_bot/update_checker.py:
|
||||
"Could not determine local version.": "Konnte lokale Version nicht ermitteln."
|
||||
"Could not determine release commit hash.": "Konnte Release-Commit-Hash nicht ermitteln."
|
||||
"Could not get releases: %s": "Konnte Releases nicht abrufen: %s"
|
||||
"Failed to get commit dates: %s": "Fehler beim Abrufen der Commit-Daten: %s"
|
||||
"Failed to get release commit: %s": "Fehler beim Abrufen des Release-Commits: %s"
|
||||
? "Release notes:\n%s"
|
||||
: "Release-Notizen:\n%s"
|
||||
"You are on the latest version: %s (compared to %s in channel %s)": "Sie verwenden die neueste Version: %s (verglichen mit %s im Kanal %s)"
|
||||
|
||||
Reference in New Issue
Block a user