Update checker: query Gitea API for latest release #29

Closed
opened 2026-02-08 16:20:07 +00:00 by forbes · 0 comments
Owner

Goal

Background check on startup that compares the running version against the latest Gitea release.

Implementation

  • Create src/Mod/Create/update_checker.py with:
    • check_for_update() — GET https://git.kindred-systems.com/api/v1/repos/kindred/create/releases/latest using urllib.request
    • Parse JSON response, extract tag_name (strip leading v), compare to VERSION using tuple comparison
    • Return UpdateInfo dict: {version, release_url, assets, body} or None if up to date
    • Skip prereleases. Timeout: 5s. Failures logged silently.
  • Preferences in User parameter:BaseApp/Preferences/Mod/KindredCreate/Update:
    • CheckEnabled (bool, default True)
    • LastCheckTimestamp (string, ISO 8601)
    • CheckIntervalDays (int, default 1)
    • SkippedVersion (string)
  • Wire into src/Mod/Create/InitGui.py via QTimer.singleShot(10000, _check_for_updates)

Depends on

  • #28 (version constant)

Files

  • src/Mod/Create/update_checker.py (new)
  • src/Mod/Create/InitGui.py (modify)
## Goal Background check on startup that compares the running version against the latest Gitea release. ## Implementation - Create `src/Mod/Create/update_checker.py` with: - `check_for_update()` — GET `https://git.kindred-systems.com/api/v1/repos/kindred/create/releases/latest` using `urllib.request` - Parse JSON response, extract `tag_name` (strip leading `v`), compare to `VERSION` using tuple comparison - Return `UpdateInfo` dict: `{version, release_url, assets, body}` or `None` if up to date - Skip prereleases. Timeout: 5s. Failures logged silently. - Preferences in `User parameter:BaseApp/Preferences/Mod/KindredCreate/Update`: - `CheckEnabled` (bool, default True) - `LastCheckTimestamp` (string, ISO 8601) - `CheckIntervalDays` (int, default 1) - `SkippedVersion` (string) - Wire into `src/Mod/Create/InitGui.py` via `QTimer.singleShot(10000, _check_for_updates)` ## Depends on - #28 (version constant) ## Files - `src/Mod/Create/update_checker.py` (new) - `src/Mod/Create/InitGui.py` (modify)
forbes referenced this issue from a commit 2026-02-14 16:31:28 +00:00
forbes referenced this issue from a commit 2026-02-14 16:34:32 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kindred/create#29