Skip to content

Comments

Add backend version update check via GitHub Tags API + GHCR image verification#85

Closed
Copilot wants to merge 1 commit intomainfrom
copilot/check-version-update-code-again
Closed

Add backend version update check via GitHub Tags API + GHCR image verification#85
Copilot wants to merge 1 commit intomainfrom
copilot/check-version-update-code-again

Conversation

Copy link

Copilot AI commented Feb 22, 2026

The project lacked a backend mechanism to check for new releases and surface update notifications in the UI.

Changes

src/utils/VersionChecker.js (new)

  • getCurrentVersion() — reads from process.env.VERSION (Docker build injection) or package.json
  • fetchTags() — queries GitHub Tags API, filters v* tags (excludes preview-*), sorts descending by semver
  • checkDockerImageExists(tag) — verifies image availability on GHCR, handles OAuth token challenge flow
  • checkForUpdates() — returns { current, hasUpdate, latest, releaseUrl }, only reports an update when the corresponding Docker image is actually available

src/routes/StatusRoutes.js

  • New authenticated GET /api/version/check endpoint
  • Respects CHECK_UPDATE=false env var; returns { disabled: true } when opt-out

.env.example

  • Documents CHECK_UPDATE=true

ui/app/pages/StatusPage.vue

  • Calls /api/version/check on mount; renders version info card with update link when hasUpdate is true

Example response

// GET /api/version/check
{ "current": "0.7.1", "hasUpdate": true, "latest": "v0.8.0", "releaseUrl": "https://github.com/iBUHub/AIStudioToAPI/releases/tag/v0.8.0" }

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

Copilot AI changed the title [WIP] Add backend version update check code Add backend version update check via GitHub Tags API + GHCR image verification Feb 22, 2026
Copilot AI requested a review from bbbugg February 22, 2026 09:14
@bbbugg bbbugg closed this Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants